• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

carloscuesta/starterkit: A Front End development Gulp.js based workflow.

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称(OpenSource Name):

carloscuesta/starterkit

开源软件地址(OpenSource Url):

https://github.com/carloscuesta/starterkit

开源编程语言(OpenSource Language):

JavaScript 41.7%

开源软件介绍(OpenSource Introduction):

Carlos Cuesta Starter Kit

Build Status Dependency Status GitHub release XO code style

Carlos Cuesta Starterkit

A simple starterkit boilerplate that I use to realize my front end static development projects. If you have comments or suggestions feel free to give me a shout on Twitter! Also checkout the yeoman generator-startekit.

Technologies

  • Gulp - Automate and enhance your workflow
  • Pug - Terse language for writing HTML templates.
  • SASS - CSS with superpowers.
  • Babel - Use next generation JavaScript, today (ES5 => ES6).
  • Flexboxgrid - A grid system based on the flex display property.
  • NodeJS - JavaScript runtime built on Chrome's V8 JavaScript engine.

Requirements and Use

Requirements

$ npm install -g gulp

Use

$ git clone https://github.com/carloscuesta/starterkit.git
$ cd starterkit/ && npm install
$ gulp

Tasks

gulp: Runs the default task (dev) including the following ones :

  • styles: SCSS compiling to CSS, css minification and autoprefixing.
  • templates: Pug compiling and rendering to HTML.
  • scripts: ES6 to ES5 with babel, scripts minification and concatenation into a single file.
  • images: Image compression.
  • beautify: Beautify your preproduction files at ./dist/.
  • serve: Starts a server at ./dist/ with all your compiled files, looking for file changes and injecting them into your browser.

gulp build: Builds your project. runs the following tasks:

  • styles
  • templates
  • scripts
  • images
  • beautify

gulp optimize: Optimizes your project (to improve the pagespeed) runs:

  • uncss: Removes unused CSS from your styles file using uncss.
  • critical: Extract and inline critical-path (above-the-fold) CSS from HTML using critical
  • images

gulp deploy: Deploy your dist folder into your server or surge cloud runs:

If you want to use the deploy task, you will have to edit the gulpfile.js lines between 65-69 with your ftp connection info: host | user | password. If you want to use Surge instead of FTP, just setup a domain name in the surgeInfo.domain

Once you setup ftpCredentials, you will have to choose a directory of your server where the deploy will go: ftpUploadsDir

Now you will be able to use gulp deploy and your /dist/ folder will go up to your ftp server!

Use npm run to list the gulp tasks available. You can run the tasks too using the npm run scriptname that is on the list.

Project Structure

.
├── /dist/                   # Minified, optimized and compiled files.
│   ├── /assets/             # Assets folder.
│   │   ├── /css/            # CSS style files.
│   │   ├── /files/          # Static files.
│   │   │   └── img/         # Images folder.
│   │   └── /js/             # JS files.
│   └── *.html               # Rendered and compiled HTMLs from Pug.
├── /node_modules/           # Node modules dependencies and packages.
├── /src/                    # Source files.
│   ├── /images/             # Images non compressed.
│   ├── /scripts/            # JavaScript files.
│   ├── /styles/             # SCSS style files.
│   │   └── _includes/       # Styles SCSS partials.
│   ├── /templates/          # Templating Pug files.
│   │   └── _includes/       # Templating Pug partials.
└── gulpfile.js              # Gulp automatization file.

Demo

starterkit-terminal

License

The code is available under the MIT license.




鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap