Front-end components
🏠 Homepage
npm install
npm start
gulp-front is an opinionated generator for web development. Tools for building a great experience across many devices. A solid starting point for both professionals and newcomers to the industry.
Available | |
---|---|
Browsersync | ✅ |
Pug | ✅ |
Twig | ✅ |
Sass | ✅ |
Less | ✅ |
GulpV4 | ✅ |
Webpack | ✅ |
Typescript | ✅ |
JavaScript ES6+ Support | ✅ |
State Management | ✅ |
PostCSS support | ✅ |
Live Browser Reloading | ✅ |
Code spliting | ✅ |
Optimize Images | ✅ |
Minify Css and Javascript | ✅ |
SEO | ✅ |
Unit test | ❌ |
At present, I officially aim to support the last two versions of the following browsers:
- Chrome
- Edge
- Firefox
- Safari
- Internet Explorer
This is not to say that gulp-front cannot be used in browsers older than those reflected, but merely that my focus will be on ensuring our layouts work great in the above.
NOTE: For OSX users You may have some issues compiling code during installation of packages. Please install Xcode from App Store first. After Xcode is installed, open Xcode and go to Preferences -> Download -> Command Line Tools -> Install to install command line tools.
NOTE: For Windows users You may have some issues compiling BrowserSync during installation of packages. Please go to http://www.browsersync.io/docs/#windows-users for more information on how to get all the needed dependencies.
Bring up a terminal and type node --version
.
Node should respond with a version at or above 12.x.x.
If you need to install Node, go to nodejs.org and click on the big green Install button.
Bring up a terminal and type gulp --version
.
If Gulp is installed it should return a version number at or above 4.x.x.
If you need to install/upgrade Gulp, open up a terminal and type in the following:
$ npm install --global gulp
$ npm install --global gulp-cli
You can use gulp-cli without install globally by flowing:
$ npx gulp [your_gulp_task]
This will install Gulp globally. Depending on your user account, you may need to configure your system to install packages globally without administrative privileges.
Next, install the local dependencies requires:
$ npm install
That's it! You should now have everything needed to use the gulp-component.
You may also want to get used to some of the commands available.
There are few commands available to help you build and test sites:
Watch For Changes & Automatically Refresh Across Devices
$ npm start
npm start
task creates the tmp
folder in the root of the project.
This includes linting as well as image, script, stylesheet and HTML optimization.
Also, a browsersync script will be automatically generated, which will take care of precaching your sites resources.
Serve the Fully Built & Optimized Site
$ npm run build
npm run build
task creates the build
folder in the root of the project with minifying files. It will help you to create clear instances of code for the production or further implementation.
$ npm run add [component_name][files]
$ npm run add header[.js,.pug,.scss]
$ npm run add page [page_name][files]
$ npm run add index[.js,.pug,.scss]
Error: ENOENT: no such file or directory, scandir
$ npm update
$ npm install
$ node node_modules/node-sass/scripts/install.js
$ npm rebuild node-sass
Can not install node-gym (Window error)
Open powershell as admin then install windows-build-tools
$ npm install --global --production windows-build-tools
$ npm install --global node-gyp
👤 ngocsangyem
- Website: https://ngocsangyem.io/
- Twitter: @ngocsangyem
- Github: @ngocsangyem
- LinkedIn: @ngocsangyem
Contributions, issues and feature requests are welcome!
Feel free to check issues page. You can also take a look at the contributing guide.
Give a ⭐️ if this project helped you!
- Document
Copyright © 2020 ngocsangyem.
This project is MIT licensed.