Package Exports
- theme-support-express
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (theme-support-express) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Wordpress like themes
Description
This is my first nodeJS project I'm working on its to build up my skill. It will become updates which will change the coding style and methods. I appreciate your feedback.
How to use it?
Step 1
Add a new static direction in your ExpressJS app, which should look like this:
app.use(express.static(path.join(__dirname, 'themes')));
Step 2
Create the root folder for the themes in your root direction
├── app.js
├── bin
│ └── www
├── package-lock.json
├── package.json
├── public
│ ├── images
│ ├── javascripts
│ └── stylesheets
│ └── style.css
├── routes
│ ├── getThemeinformation.js
│ ├── index.js
│ └── users.js
├── themes <-- Here
└── views
├── error.ejs
└── index.ejs
Like this.
Step 3
routes/index.js
const searchTheme = new searchTheme();
searchTheme.getThemeInformation(appRoot, 'themes').then((r) => {
res.render('index', { style: r.main });
});
views/index.ejs
<link rel='stylesheet' href='<%= style %>' />
This will load the selected Theme.
What is planed?
- Global theme config
- Javascript loader
- Webpack support
- Minimizer
- SCSS to CSS
Dependencies used
Bugs
If you find bugs please open an issue or create a Pull request.
License
This project is licensed under the MIT License. ##
I hope you enjoy this project :)