Novicell Default Frontend package is a framework for your frontend setup. This setup helps developer by automizing frontend workflow using certain technologies like NPM Scripts and Webpack. It includes PostCSS, Stylelint, Webpack, ESLint, Babel, Fractal. When setup, it also helps you optimize images, combine SVGs to a sprite, generate favicons, minifying/optimizing CSS and Javascript.
git clone https://github.com/Novicell/novicell-frontend.git.npm install to install all dependencies.npm run build:dev to build the dist folder with all the minified/optimized files.npm run dev to start watching file changes and continuous copilation.The whole automized build system looks for paths and variables in order to work dynamically with different projects. Therefore, when starting new project edit options in 2 files (they are both in root directory):
config.jspackage.jsonconfig.js:
const dist = '/dist/'; // /dist by default. Folder where all the built files will go to (minified/optimized/compiled)
const sourceRootFolder = '/src/'; // /src by default. Folder where ATOM modules belong
const modulesDir = '/src/modules/**/*.js'; // Where JavaScript files should be placed. Add CSS files here if you want them as separate bundle
const assetsDir = '/assets/'; // Wheer you keep images, fonts, icons...Look for “config” field in package.json and fill in:
"config": {
"DIST": "dist",
"CSS_MODULES": "src/modules/*.css"
},These are most often used scripts:
npm run dev and npm run build:devnpm run prod and npm run build:prodBut there are more available in this package (add npm run before script name):
fractal - Runs fractalfractal:build - Builds static siteclean - Deletes the files/directories defined in: gulp/config.js > pathsToCleanfonts - Copies the fonts defined in: config.js to distimages - Minifies images defined in: config.js to dist/imagessprites - Minifies all sprites from assets/icons to dist/icons.styles - Minifies/lints and bundles CSS files defined in: src/modules to dist/styleswebpack - Minifies/optimizes/lints and bundles JS files defined in: src/modules to dist/scriptswatch:styles - Automatically bundles CSS changes while developingwatch:webpack - Automatically bundles JS changes while developingdeploy - Uploads file via FTP, configuration can be found in gulp/config.jsdev - webpack:watch + styles:watch + fractalstart - Equal to devprod - Same as dev but in production (extra optimization) but slower build,fix - Fixes all possible linting for JavaScriptbuildDrupal - (For drupal projects) Bundles JavaScript and CSS into same locationgenerateFavicon - generates a favicon based on config/favicon/faviconDescription.json settingsnpm link in the root dir. (only have to do it once)createComponent -t a -n my-componentThis example will create files in /src/01-atoms/my-component
| Argument | Name | Type | Description |
|---|---|---|---|
| -t | Type | a/m/o/p |
Defines the type of your component, this decides where the component is created. a = atom, m = molecule, o = organism, p = page; |
| -n | Name | string |
Sets the filename of the component files, and a capitalized version will be used as title in the config file |
If you need more information, we have a Wiki that contains in-depth explanations:
Looking to contribute something? Here’s how you can help. Please take a moment to review our contribution guidelines in order to make the contribution process easy and effective for everyone involved.
The Novicell Frontend is licensed under the MIT license. (http://opensource.org/licenses/MIT)
Danni Larsen |
Juozas Rastenis |
Jonas Havmøller |
shp-novicell |
Henrik Madsen |
Bjornnyborg |
emilankersen |
MKAndersen |
This project follows the all-contributors specification. Contributions of any kind welcome!