Netcore Front-End Boilerplate to quickly start off a new project.
Based on: yarn, webpack and gulp.
Vendor libraries included by default: bootstrap 4.0.0-beta.2, jquery
If you are a front-end developer, please see "FRONTEND.md" to learn about the development workflow
| Engine | Version |
|---|---|
| node | ≥6 |
git clone https://github.com/netcore/frontend-base.git <project name>cd <project name>yarn or yarn install.placeholder files.eslintrc.json):gulp dev or gulp watch to start a local server and watch for changes
gulp prod to get project templates and assets ready for production
this task may take longer to finish because of image processing tasks
gem install bundlerbundle exec yarn or bundle exec gulp prod)bundle clean --force and then bundle install ├── resources/
│ ├── _assets/
│ ├── favicon/
│ ├── fonts/ # Fallback fonts for situations where the end-user cannot access Google CDN
│ ├── img/ # Source images that will get compressed on production
│ ├── js/
│ ├── classes/ # ES6 Classes
│ ├── components/ # Any site component (e.g. Steps, Tabs, FileUpload etc.)
| ├── app.js # Our application's code
| ├── vendor.js # Vendor libraries
│ ├── json/ # JSON for JS use
│ ├── sass/
│ ├── base/
│ ├── functions/ # SCSS functions
│ ├── mixins/ # SCSS mixins
│ ├── _functions.scss # Imports of functions from the "functions" directory
│ ├── _mixins.scss # Imports of mixins from the "mixins" directory
│ ├── _general.scss # General styling (e.g. body)
│ ├── _variables.scss # All project variables
│ ├── components/ # Project components (e.g. buttons, header, etc.)
│ ├── vendor/ # Vendor library imports
│ ├── _bootstrap.scss # Vendor library imports
│ ├── app.scss # Imports of all vendors, components etc.
│ ├── svg/
│ ├── _includes/ # Jekyll template partials
│ ├── _layouts/ # Jekyll layouts
│ ├── _data/ # JSON for Jekyll use (different from the one found inside the "_assets" folder)
├── _config.yml # Jekyll configuration
├── package.json # Installed packages
└── gulpfile.js # Our core for the development of application
└── webpack.config.js # JavaScript processing
└── yarn.lock # Required to get consistent installs across machines
yarn add <package name> in your terminal/cmdimport '<package name>' in vendor.js and app.js or any component fileComment: Importing in both places is important because we do not want to have our app.bundle.js output to contain any of the vendor libraries. By doing it this way, webpack notices the sames libraries and puts them in a file named common.bundle.js.
{% include_relative _assets/svg/<icon name>.svg %}base/_variables.scsscomponents/ directory (e.g. buttons, forms, header, footer etc.)_ prefix added to them (e.g. buttons.scss -> _buttons.scss)pages/ directorycomponents/ and classes/resources/_assets/fonts/<font family name in lowercase>/Comment: this is done because some of our clients may have their access to Google's CDN blocked - thus not allowing them to see the custom font.
resources/_assets/sass/base/_fonts.scss to match your font files.form-submit to your submit button and class .validate to your <form> elementdata-error attribute to your <input>, <select>, <textarea> elementsrequired attribute.has-error classes applied to .form-group elementsempty