在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(OpenSource Name):cferdinandi/gulp-boilerplate开源软件地址(OpenSource Url):https://github.com/cferdinandi/gulp-boilerplate开源编程语言(OpenSource Language):JavaScript 90.3%开源软件介绍(OpenSource Introduction):Gulp BoilerplateA boilerplate for building web projects with Gulp. Uses Gulp 4.x. IMPORTANT: This project is no longer maintained, and is offered as-is. It is strongly recommended that you instead use my Build Tool Boilerplate. Features
Gulp Boilerplate makes it easy to turn features on and off, so you can reuse it for all of your projects without having to delete or modify tasks. Getting StartedDependenciesNote: if you've previously installed Gulp globally, run Make sure these are installed first.
Quick Start
Try it out. After installing, run DocumentationAdd your source files to the appropriate
package.jsonThe Some information is automatically pulled in from it and added to a header that's injected into the top of your JavaScript and CSS files. {
"name": "project-name",
"version": "0.0.1",
"description": "A description for your project.",
"main": "./dist/your-main-js-file.js",
"author": {
"name": "YOUR NAME",
"url": "http://link-to-your-website.com"
},
"license": "MIT",
"repository": {
"type": "git",
"url": "http://link-to-your-git-repo.com"
},
"devDependencies": {}
} Note: JavaScriptPut your JavaScript files in the Files placed directly in the A note about polyfills: In subdirectories that contain files with the SassPut your Sass files in the Gulp generates minified and unminified CSS files. It also includes autoprefixer, which adds vendor prefixes for you. SVGsPlace SVG files in the SVG files will be optimized with SVGO and compiled into Copy FilesFiles and folders placed in the This is a great place to put HTML files, images, and pre-compiled assets. Options & SettingsGulp Boilerplate makes it easy to customize for projects without having to delete or modify tasks. Options and settings are located at the top of the SettingsSet features under the /**
* Settings
* Turn on/off build features
*/
var settings = {
clean: true,
scripts: true,
polyfills: true,
styles: true,
svgs: true,
copy: true,
reload: true
}; PathsAdjust the /**
* Paths to project folders
*/
var paths = {
input: 'src/',
output: 'dist/',
scripts: {
input: 'src/js/*',
// polyfills: '!src/js/*.polyfill.js',
polyfills: '.polyfill.js',
output: 'dist/js/'
},
styles: {
input: 'src/sass/**/*.{scss,sass}',
output: 'dist/css/'
},
svgs: {
input: 'src/svg/*.svg',
output: 'dist/svg/'
},
copy: {
input: 'src/copy/*',
output: 'dist/'
},
reload: './dist/'
}; HeaderGulp auto-injects a header into all of your JavaScript and CSS files with details from your You can change what's included under the /**
* Template for banner to add to file headers
*/
var banner = {
full:
'/*!\n' +
' * <%= package.name %> v<%= package.version %>\n' +
' * <%= package.description %>\n' +
' * (c) ' + new Date().getFullYear() + ' <%= package.author.name %>\n' +
' * <%= package.license %> License\n' +
' * <%= package.repository.url %>\n' +
' */\n\n',
min:
'/*!' +
' <%= package.name %> v<%= package.version %>' +
' | (c) ' + new Date().getFullYear() + ' <%= package.author.name %>' +
' | <%= package.license %> License' +
' | <%= package.repository.url %>' +
' */\n'
}; LicenseThe code is available under the MIT License. |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论