For more information, take a look at the package.json file or visit the linked npm package sites.
Getting Started
In order to get started, make sure you are meeting all requirements listed above.
Then, just go ahead and download the Gulp Starter Kit. For this, you can choose between the following options:
npm init
The recommended way of downloading the Gulp Starter Kit uses the command npm init and the create-gulp-starter-kit npm package as the initializer.
For this, just follow these steps:
Execute npm init @jr-cologne/gulp-starter-kit your-project-name. This creates a folder called your-project-name (change that to your project name) at the current location where your terminal / command prompt is pointing to. Moreover, this initializes your project and installs all dependencies.
Change your working directory to your project folder by executing cd your-project-name.
Spin up your web development environment with the command npm start.
The other way of downloading the Gulp Starter Kit is by cloning this Git repository. Before executing any commands, make sure you have Git installed on your computer.
Then, follow these instructions:
Execute git clone https://github.com/jr-cologne/gulp-starter-kit.git your-project-name. This creates a folder called your-project-name (change that to your project name) at the current location where your terminal / command prompt is pointing to.
Change your working directory to your project folder by executing cd your-project-name.
Install all dependencies by executing npm install.
Spin up your web development environment with the command npm start.
What kinds of build scripts does the Gulp Starter Kit offer?
The Gulp Starter Kit offers two different build scripts:
npm run build: This is used to build all files and run all tasks without serving a development server and watching for changes.
npm start: This is the normal development script used to build all files and run all tasks, but also to serve a development server and watch for changes.
How can I use another CSS preprocessor than Sass?
In case you prefer to use one of the other supported CSS preprocessors over Sass, you can simply create a new directory src/assets/css-processor-name which is where all your CSS preprocessor files have to be placed.
After you have moved all your code to the new folder, just make sure to delete the sass directory and everything should work as expected.
Here's a list of the currently supported CSS preprocessors and the corresponding directory names:
Sass (src/assets/sass)
SCSS (src/assets/scss)
Less (src/assets/less)
Stylus (src/assets/stylus)
How can I specify for which browsers CSS code should be autoprefixed?
The recommended way of specifying which browsers should be targeted by the CSS autoprefixer is to add a browserslist key to package.json:
The following types of images are currently supported:
PNG
JPG / JPEG
GIF
SVG
ICO (not compressed)
How can I specify dependencies which are then copied to the dist folder?
You don't need to specify your dependencies anywhere else than in your package.json file.
Just install your dependencies via npm and all your dependencies get automatically loaded and copied into the dist folder.
How can I load dependencies inside my application?
ES6 modules are supported by this Gulp Starter Kit.
Just install your dependencies and import them like so:
importaxiosfrom'axios';
Contributing
Feel free to contribute to this project!
Any kinds of contributions are highly appreciated!
Please make sure to follow the process below in order to contribute to this project:
Open an Issue to describe what you are about to do. You should make sure to get feedback as early as possile to ensure your work does not end up as waisted time.
Fork this repository by clicking the fork button at the top of this page.
Clone your newly created fork (git clone https://github.com/your-github-username/gulp-starter-kit.git).
Make your changes and commit them to your forked repository.
Once finished, open a detailed Pull Request describing your changes.
Wait for your PR to be accepted and merged.
Versioning
This project uses the rules of semantic versioning. For more information, visit semver.org.
请发表评论