├── .babelrc
├── .editorconfig
├── .gitattributes
├── .gitignore
├── .travis.yml
├── LICENSE
├── README.md
├── app
├── basic.html
├── favicon.ico
├── humans.txt
├── images
│ ├── hamburger.svg
│ └── touch
│ │ ├── apple-touch-icon.png
│ │ ├── chrome-touch-icon-192x192.png
│ │ ├── icon-128x128.png
│ │ └── ms-touch-icon-144x144-precomposed.png
├── index.html
├── manifest.json
├── manifest.webapp
├── robots.txt
├── scripts
│ ├── bootstrap.min.js
│ └── jquery-1.11.1.min.js
├── service-worker.js
└── styles
│ ├── bootstrap.min.css
│ └── components
│ ├── _components
│ └── .gitkeep
│ ├── _modules
│ └── .gitkeep
│ └── _pages
│ └── .gitkeep
├── docs
├── commands.md
├── deploy-appengine.md
├── deploy-firebase.md
├── deploy.md
├── file-appendix.md
├── install.md
└── mdl-sass.md
├── gulpfile.babel.js
└── package.json
/.babelrc:
--------------------------------------------------------------------------------
1 | {
2 | "presets": ["es2015"],
3 | // Remove the line below to enable ES2015 support.
4 | "only": "gulpfile.babel.js",
5 | "retainLines": true
6 | }
7 |
--------------------------------------------------------------------------------
/.editorconfig:
--------------------------------------------------------------------------------
1 | # editorconfig.org
2 | root = true
3 |
4 | [*]
5 | indent_style = space
6 | indent_size = 2
7 | end_of_line = lf
8 | charset = utf-8
9 | trim_trailing_whitespace = true
10 | insert_final_newline = true
11 |
12 | [*.md]
13 | trim_trailing_whitespace = false
14 |
--------------------------------------------------------------------------------
/.gitattributes:
--------------------------------------------------------------------------------
1 | * text=auto
2 | CONTRIBUTING.md export-ignore
3 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | node_modules
2 | dist/
3 | .tmp
4 | app.yaml
5 |
--------------------------------------------------------------------------------
/.travis.yml:
--------------------------------------------------------------------------------
1 | sudo: false
2 | language: node_js
3 | node_js:
4 | - '5'
5 | - '4'
6 | - '0.12'
7 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 |
2 | Apache License
3 | Version 2.0, January 2004
4 | http://www.apache.org/licenses/
5 |
6 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7 |
8 | 1. Definitions.
9 |
10 | "License" shall mean the terms and conditions for use, reproduction,
11 | and distribution as defined by Sections 1 through 9 of this document.
12 |
13 | "Licensor" shall mean the copyright owner or entity authorized by
14 | the copyright owner that is granting the License.
15 |
16 | "Legal Entity" shall mean the union of the acting entity and all
17 | other entities that control, are controlled by, or are under common
18 | control with that entity. For the purposes of this definition,
19 | "control" means (i) the power, direct or indirect, to cause the
20 | direction or management of such entity, whether by contract or
21 | otherwise, or (ii) ownership of fifty percent (50%) or more of the
22 | outstanding shares, or (iii) beneficial ownership of such entity.
23 |
24 | "You" (or "Your") shall mean an individual or Legal Entity
25 | exercising permissions granted by this License.
26 |
27 | "Source" form shall mean the preferred form for making modifications,
28 | including but not limited to software source code, documentation
29 | source, and configuration files.
30 |
31 | "Object" form shall mean any form resulting from mechanical
32 | transformation or translation of a Source form, including but
33 | not limited to compiled object code, generated documentation,
34 | and conversions to other media types.
35 |
36 | "Work" shall mean the work of authorship, whether in Source or
37 | Object form, made available under the License, as indicated by a
38 | copyright notice that is included in or attached to the work
39 | (an example is provided in the Appendix below).
40 |
41 | "Derivative Works" shall mean any work, whether in Source or Object
42 | form, that is based on (or derived from) the Work and for which the
43 | editorial revisions, annotations, elaborations, or other modifications
44 | represent, as a whole, an original work of authorship. For the purposes
45 | of this License, Derivative Works shall not include works that remain
46 | separable from, or merely link (or bind by name) to the interfaces of,
47 | the Work and Derivative Works thereof.
48 |
49 | "Contribution" shall mean any work of authorship, including
50 | the original version of the Work and any modifications or additions
51 | to that Work or Derivative Works thereof, that is intentionally
52 | submitted to Licensor for inclusion in the Work by the copyright owner
53 | or by an individual or Legal Entity authorized to submit on behalf of
54 | the copyright owner. For the purposes of this definition, "submitted"
55 | means any form of electronic, verbal, or written communication sent
56 | to the Licensor or its representatives, including but not limited to
57 | communication on electronic mailing lists, source code control systems,
58 | and issue tracking systems that are managed by, or on behalf of, the
59 | Licensor for the purpose of discussing and improving the Work, but
60 | excluding communication that is conspicuously marked or otherwise
61 | designated in writing by the copyright owner as "Not a Contribution."
62 |
63 | "Contributor" shall mean Licensor and any individual or Legal Entity
64 | on behalf of whom a Contribution has been received by Licensor and
65 | subsequently incorporated within the Work.
66 |
67 | 2. Grant of Copyright License. Subject to the terms and conditions of
68 | this License, each Contributor hereby grants to You a perpetual,
69 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70 | copyright license to reproduce, prepare Derivative Works of,
71 | publicly display, publicly perform, sublicense, and distribute the
72 | Work and such Derivative Works in Source or Object form.
73 |
74 | 3. Grant of Patent License. Subject to the terms and conditions of
75 | this License, each Contributor hereby grants to You a perpetual,
76 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77 | (except as stated in this section) patent license to make, have made,
78 | use, offer to sell, sell, import, and otherwise transfer the Work,
79 | where such license applies only to those patent claims licensable
80 | by such Contributor that are necessarily infringed by their
81 | Contribution(s) alone or by combination of their Contribution(s)
82 | with the Work to which such Contribution(s) was submitted. If You
83 | institute patent litigation against any entity (including a
84 | cross-claim or counterclaim in a lawsuit) alleging that the Work
85 | or a Contribution incorporated within the Work constitutes direct
86 | or contributory patent infringement, then any patent licenses
87 | granted to You under this License for that Work shall terminate
88 | as of the date such litigation is filed.
89 |
90 | 4. Redistribution. You may reproduce and distribute copies of the
91 | Work or Derivative Works thereof in any medium, with or without
92 | modifications, and in Source or Object form, provided that You
93 | meet the following conditions:
94 |
95 | (a) You must give any other recipients of the Work or
96 | Derivative Works a copy of this License; and
97 |
98 | (b) You must cause any modified files to carry prominent notices
99 | stating that You changed the files; and
100 |
101 | (c) You must retain, in the Source form of any Derivative Works
102 | that You distribute, all copyright, patent, trademark, and
103 | attribution notices from the Source form of the Work,
104 | excluding those notices that do not pertain to any part of
105 | the Derivative Works; and
106 |
107 | (d) If the Work includes a "NOTICE" text file as part of its
108 | distribution, then any Derivative Works that You distribute must
109 | include a readable copy of the attribution notices contained
110 | within such NOTICE file, excluding those notices that do not
111 | pertain to any part of the Derivative Works, in at least one
112 | of the following places: within a NOTICE text file distributed
113 | as part of the Derivative Works; within the Source form or
114 | documentation, if provided along with the Derivative Works; or,
115 | within a display generated by the Derivative Works, if and
116 | wherever such third-party notices normally appear. The contents
117 | of the NOTICE file are for informational purposes only and
118 | do not modify the License. You may add Your own attribution
119 | notices within Derivative Works that You distribute, alongside
120 | or as an addendum to the NOTICE text from the Work, provided
121 | that such additional attribution notices cannot be construed
122 | as modifying the License.
123 |
124 | You may add Your own copyright statement to Your modifications and
125 | may provide additional or different license terms and conditions
126 | for use, reproduction, or distribution of Your modifications, or
127 | for any such Derivative Works as a whole, provided Your use,
128 | reproduction, and distribution of the Work otherwise complies with
129 | the conditions stated in this License.
130 |
131 | 5. Submission of Contributions. Unless You explicitly state otherwise,
132 | any Contribution intentionally submitted for inclusion in the Work
133 | by You to the Licensor shall be under the terms and conditions of
134 | this License, without any additional terms or conditions.
135 | Notwithstanding the above, nothing herein shall supersede or modify
136 | the terms of any separate license agreement you may have executed
137 | with Licensor regarding such Contributions.
138 |
139 | 6. Trademarks. This License does not grant permission to use the trade
140 | names, trademarks, service marks, or product names of the Licensor,
141 | except as required for reasonable and customary use in describing the
142 | origin of the Work and reproducing the content of the NOTICE file.
143 |
144 | 7. Disclaimer of Warranty. Unless required by applicable law or
145 | agreed to in writing, Licensor provides the Work (and each
146 | Contributor provides its Contributions) on an "AS IS" BASIS,
147 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148 | implied, including, without limitation, any warranties or conditions
149 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150 | PARTICULAR PURPOSE. You are solely responsible for determining the
151 | appropriateness of using or redistributing the Work and assume any
152 | risks associated with Your exercise of permissions under this License.
153 |
154 | 8. Limitation of Liability. In no event and under no legal theory,
155 | whether in tort (including negligence), contract, or otherwise,
156 | unless required by applicable law (such as deliberate and grossly
157 | negligent acts) or agreed to in writing, shall any Contributor be
158 | liable to You for damages, including any direct, indirect, special,
159 | incidental, or consequential damages of any character arising as a
160 | result of this License or out of the use or inability to use the
161 | Work (including but not limited to damages for loss of goodwill,
162 | work stoppage, computer failure or malfunction, or any and all
163 | other commercial damages or losses), even if such Contributor
164 | has been advised of the possibility of such damages.
165 |
166 | 9. Accepting Warranty or Additional Liability. While redistributing
167 | the Work or Derivative Works thereof, You may choose to offer,
168 | and charge a fee for, acceptance of support, warranty, indemnity,
169 | or other liability obligations and/or rights consistent with this
170 | License. However, in accepting such obligations, You may act only
171 | on Your own behalf and on Your sole responsibility, not on behalf
172 | of any other Contributor, and only if You agree to indemnify,
173 | defend, and hold each Contributor harmless for any liability
174 | incurred by, or claims asserted against, such Contributor by reason
175 | of your accepting any such warranty or additional liability.
176 |
177 | END OF TERMS AND CONDITIONS
178 |
179 | APPENDIX: How to apply the Apache License to your work.
180 |
181 | To apply the Apache License to your work, attach the following
182 | boilerplate notice, with the fields enclosed by brackets "[]"
183 | replaced with your own identifying information. (Don't include
184 | the brackets!) The text should be enclosed in the appropriate
185 | comment syntax for the file format. We also recommend that a
186 | file or class name and description of purpose be included on the
187 | same "printed page" as the copyright notice for easier
188 | identification within third-party archives.
189 |
190 | Copyright 2015 Google Inc
191 |
192 | Licensed under the Apache License, Version 2.0 (the "License");
193 | you may not use this file except in compliance with the License.
194 | You may obtain a copy of the License at
195 |
196 | http://www.apache.org/licenses/LICENSE-2.0
197 |
198 | Unless required by applicable law or agreed to in writing, software
199 | distributed under the License is distributed on an "AS IS" BASIS,
200 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201 | See the License for the specific language governing permissions and
202 | limitations under the License.
203 |
204 | All code in any directories or sub-directories that end with *.html or
205 | *.css is licensed under the Creative Commons Attribution International
206 | 4.0 License, which full text can be found here:
207 | https://creativecommons.org/licenses/by/4.0/legalcode.
208 |
209 | As an exception to this license, all html or css that is generated by
210 | the software at the direction of the user is copyright the user. The
211 | user has full ownership and control over such content, including
212 | whether and how they wish to license it.
213 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | Twitter Bootstrap Web Starter Kit
2 | =================================
3 | 
4 |
5 | Google Web Starter Kit:
6 | https://github.com/google/web-starter-kit
7 |
8 | Twitter Boostrap 3:
9 | https://github.com/twbs/bootstrap
10 |
11 | Versions:
12 | - Google Web Starter Kit: **0.6.1**
13 | - Twitter Boostrap 3: **3.3.4**
14 |
15 | How to run
16 | ==========
17 | After clone repository, run "npm install" in main folder in console. Then run "gulp serve".
18 | Run in browser on localhost:3000 (it should be run automatically).
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/app/basic.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
").append(m.parseHTML(a)).find(d):a)}).complete(c&&function(a,b){g.each(c,e||[a.responseText,b,a])}),this},m.expr.filters.animated=function(a){return m.grep(m.timers,function(b){return a===b.elem}).length};var cd=a.document.documentElement;function dd(a){return m.isWindow(a)?a:9===a.nodeType?a.defaultView||a.parentWindow:!1}m.offset={setOffset:function(a,b,c){var d,e,f,g,h,i,j,k=m.css(a,"position"),l=m(a),n={};"static"===k&&(a.style.position="relative"),h=l.offset(),f=m.css(a,"top"),i=m.css(a,"left"),j=("absolute"===k||"fixed"===k)&&m.inArray("auto",[f,i])>-1,j?(d=l.position(),g=d.top,e=d.left):(g=parseFloat(f)||0,e=parseFloat(i)||0),m.isFunction(b)&&(b=b.call(a,c,h)),null!=b.top&&(n.top=b.top-h.top+g),null!=b.left&&(n.left=b.left-h.left+e),"using"in b?b.using.call(a,n):l.css(n)}},m.fn.extend({offset:function(a){if(arguments.length)return void 0===a?this:this.each(function(b){m.offset.setOffset(this,a,b)});var b,c,d={top:0,left:0},e=this[0],f=e&&e.ownerDocument;if(f)return b=f.documentElement,m.contains(b,e)?(typeof e.getBoundingClientRect!==K&&(d=e.getBoundingClientRect()),c=dd(f),{top:d.top+(c.pageYOffset||b.scrollTop)-(b.clientTop||0),left:d.left+(c.pageXOffset||b.scrollLeft)-(b.clientLeft||0)}):d},position:function(){if(this[0]){var a,b,c={top:0,left:0},d=this[0];return"fixed"===m.css(d,"position")?b=d.getBoundingClientRect():(a=this.offsetParent(),b=this.offset(),m.nodeName(a[0],"html")||(c=a.offset()),c.top+=m.css(a[0],"borderTopWidth",!0),c.left+=m.css(a[0],"borderLeftWidth",!0)),{top:b.top-c.top-m.css(d,"marginTop",!0),left:b.left-c.left-m.css(d,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||cd;while(a&&!m.nodeName(a,"html")&&"static"===m.css(a,"position"))a=a.offsetParent;return a||cd})}}),m.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(a,b){var c=/Y/.test(b);m.fn[a]=function(d){return V(this,function(a,d,e){var f=dd(a);return void 0===e?f?b in f?f[b]:f.document.documentElement[d]:a[d]:void(f?f.scrollTo(c?m(f).scrollLeft():e,c?e:m(f).scrollTop()):a[d]=e)},a,d,arguments.length,null)}}),m.each(["top","left"],function(a,b){m.cssHooks[b]=Lb(k.pixelPosition,function(a,c){return c?(c=Jb(a,b),Hb.test(c)?m(a).position()[b]+"px":c):void 0})}),m.each({Height:"height",Width:"width"},function(a,b){m.each({padding:"inner"+a,content:b,"":"outer"+a},function(c,d){m.fn[d]=function(d,e){var f=arguments.length&&(c||"boolean"!=typeof d),g=c||(d===!0||e===!0?"margin":"border");return V(this,function(b,c,d){var e;return m.isWindow(b)?b.document.documentElement["client"+a]:9===b.nodeType?(e=b.documentElement,Math.max(b.body["scroll"+a],e["scroll"+a],b.body["offset"+a],e["offset"+a],e["client"+a])):void 0===d?m.css(b,c,g):m.style(b,c,d,g)},b,f?d:void 0,f,null)}})}),m.fn.size=function(){return this.length},m.fn.andSelf=m.fn.addBack,"function"==typeof define&&define.amd&&define("jquery",[],function(){return m});var ed=a.jQuery,fd=a.$;return m.noConflict=function(b){return a.$===m&&(a.$=fd),b&&a.jQuery===m&&(a.jQuery=ed),m},typeof b===K&&(a.jQuery=a.$=m),m});
5 |
--------------------------------------------------------------------------------
/app/service-worker.js:
--------------------------------------------------------------------------------
1 | // This file is intentionally without code.
2 | // It's present so that service worker registration will work when serving from the 'app' directory.
3 | // The version of service-worker.js that's present in the 'dist' directory is automatically
4 | // generated by the 'generate-service-worker' gulp task, and contains code to precache resources.
5 |
--------------------------------------------------------------------------------
/app/styles/components/_components/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dszymczuk/twitter-bootstrap-web-starter-kit/e7fb3fba361fbd2144f3ec874543579b2b1a8f4e/app/styles/components/_components/.gitkeep
--------------------------------------------------------------------------------
/app/styles/components/_modules/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dszymczuk/twitter-bootstrap-web-starter-kit/e7fb3fba361fbd2144f3ec874543579b2b1a8f4e/app/styles/components/_modules/.gitkeep
--------------------------------------------------------------------------------
/app/styles/components/_pages/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dszymczuk/twitter-bootstrap-web-starter-kit/e7fb3fba361fbd2144f3ec874543579b2b1a8f4e/app/styles/components/_pages/.gitkeep
--------------------------------------------------------------------------------
/docs/commands.md:
--------------------------------------------------------------------------------
1 | There are many commands available to help you build and test sites. Here are a few highlights to get started with.
2 |
3 | ## Watch For Changes & Automatically Refresh Across Devices
4 |
5 | ```sh
6 | $ gulp serve
7 | ```
8 |
9 | This outputs an IP address you can use to locally test and another that can be used on devices
10 | connected to your network.
11 | `serve` does not use [service worker](http://www.html5rocks.com/en/tutorials/service-worker/introduction/)
12 | caching, so your site will stop being available when the web server stops running.
13 |
14 | ## Build & Optimize
15 |
16 | ```sh
17 | $ gulp
18 | ```
19 |
20 | Build and optimize the current project, ready for deployment.
21 | This includes linting as well as image, script, stylesheet and HTML optimization and minification.
22 | Also, a [service worker](http://www.html5rocks.com/en/tutorials/service-worker/introduction/)
23 | script will be automatically generated, which will take care of precaching your sites' resources.
24 | On browsers that [support](https://jakearchibald.github.io/isserviceworkerready/) service
25 | workers, the site will be loaded directly from the service worker cache, bypassing the server.
26 | This means that this version of the site will work when the server isn't running or when there is
27 | no network connectivity.
28 |
29 | ## Serve the Fully Built & Optimized Site
30 |
31 | ```sh
32 | $ gulp serve:dist
33 | ```
34 |
35 | This outputs an IP address you can use to locally test and another that can be used on devices
36 | connected to your network.
37 | `serve:dist` includes will serve a local copy of the built and optimized site generated as part
38 | of the `default` task.
39 | Because the optimized site includes a service worker which serves your site directly from the
40 | cache, you will need to reload the page after regenerating the site to pick up the latest changes.
41 | `serve:dist` uses a different HTTP port than `serve`, which means that the service workers are
42 | kept isolated in different [scopes](https://developer.mozilla.org/en-US/docs/Web/API/Service_Worker_API/Using_Service_Workers#Registering_your_worker).
43 |
44 | ## Difference Between `serve` & `serve:dist`
45 |
46 | It is important to note a difference between the `serve` and `serve:dist` tasks.
47 |
48 | * `serve` uses a no-op `service-worker.js` and cannot run offline.
49 | * `serve:dist` uses the `sw-precache`-generated output and can run offline.
50 |
51 | The `serve` task runs on port 3000 and `serve:dist` runs on port 3001.
52 | The main purpose is to ensure that different service workers will not impact each other's environment.
53 | Using the `sw-precache`-generated output makes it very difficult to quickly test local changes which is not ideal for a development server environment.
54 |
55 | ## Performance Insights
56 |
57 | ```sh
58 | $ gulp pagespeed
59 | ```
60 |
61 | Runs the deployed (public) version of your site against the [PageSpeed Insights](https://developers.google.com/speed/pagespeed/insights/) API to help you stay on top of where you can improve.
62 |
--------------------------------------------------------------------------------
/docs/deploy-appengine.md:
--------------------------------------------------------------------------------
1 | # Deploy to Google App Engine
2 |
3 | Google App Engine lets you build and run applications on Google’s infrastructure. App Engine applications are easy to create, easy to maintain, and easy to scale as your traffic and data storage needs change.
4 |
5 | ## Create the project in the Developer Console
6 |
7 | In [Google Developers Console](https://console.developers.google.com/project):
8 |
9 | 1. Create a new project
10 | 2. Take note of the project ID (e.g `algebraic-depot-114712`)
11 |
12 | ## Install Google Cloud SDK
13 |
14 | See .
15 |
16 | ## Download source code
17 |
18 | Download and extract [Web Starter Kit](https://github.com/google/web-starter-kit/releases/latest) to a local directory.
19 |
20 | Create a new file in the root of your project called `app.yaml`. Paste the following contents into it:
21 |
22 | ```
23 | application: algebraic-depot-114712
24 | version: 0
25 | runtime: php55
26 | api_version: 1
27 | threadsafe: false
28 |
29 | handlers:
30 | - url: /$
31 | static_files: index.html
32 | upload: index.html
33 |
34 | - url: /(.*)
35 | static_files: \1
36 | upload: .*
37 | ```
38 |
39 | This is a minimalist configuration for serving a Web Starter Kit project on App Engine. A more comprehensive one should you need it is available [here](https://github.com/h5bp/server-configs-gae/blob/master/app.yaml).
40 |
41 | ## Install web-starter-kit dependencies (e.g Node)
42 |
43 | See .
44 |
45 | ## Install local dependencies and generate assets
46 |
47 | ```
48 | npm install
49 | gulp
50 | ````
51 |
52 | ## Deploy
53 |
54 | ````
55 | cp app.yaml dist
56 | cd dist
57 | appcfg.py update . # "rm ~/.appcfg_oauth2_tokens" if error
58 | ````
59 |
60 | If the update fails, check that your `application` in `app.yaml` matches the project id in the Developers Console.
61 |
62 | If everything has worked, you will be able to see your fully deployed site at `.appspot.com` (e.g `https://algebraic-depot-114712.appspot.com/`).
63 |
64 |
--------------------------------------------------------------------------------
/docs/deploy-firebase.md:
--------------------------------------------------------------------------------
1 | # Deploy to Firebase using Pretty URLs
2 |
3 | Firebase is a very simple and secure way to deploy a Web Starter Kit site. You can sign up for a free account and deploy your application in less than 5 minutes.
4 |
5 | The instructions below are based on the [Firebase hosting quick start
6 | guide](https://www.firebase.com/docs/hosting/quickstart.html).
7 |
8 | 1. [Sign up for a Firebase account](https://www.firebase.com/signup/)
9 |
10 | 1. Install the Firebase command line tools
11 |
12 | npm install -g firebase-tools
13 |
14 | The `-g` flag instructs `npm` to install the package globally so that you
15 | can use the `firebase` command from any directory. You may need
16 | to install the package with `sudo` privileges.
17 |
18 | 1. `cd` into your project directory
19 |
20 | 1. Inititalize the Firebase application
21 |
22 | firebase init
23 |
24 | Firebase asks you which app you would like to use for hosting. If you just
25 | signed up, you should see one app with a randomly-generated name. You can
26 | use that one. Otherwise go to
27 | [https://www.firebase.com/account](https://www.firebase.com/account) to
28 | create a new app.
29 |
30 | 1. Firebase asks you the name of your app's public directory. Enter `dist`.
31 | This works because when you run `gulp` to build your application, WSK
32 | builds everything and places it all in `dist`. So `dist` contains
33 | everything your application needs to run.
34 |
35 | 1. Build
36 |
37 | gulp
38 |
39 | 1. Deploy
40 |
41 | firebase deploy
42 |
43 | The URL to your live site is listed in the output.
44 |
45 | You can see a deployed version of WSK at [https://web-starter-kit.firebaseapp.com/](https://web-starter-kit.firebaseapp.com/).
46 |
--------------------------------------------------------------------------------
/docs/deploy.md:
--------------------------------------------------------------------------------
1 | # Deployment
2 |
3 | Should you wish to deploy your Web Starter Kit site, a number of helpful guides are available. Select one from below to continue.
4 |
5 | * [Firebase](deploy-firebase.md)
6 | * [Google App Engine](deploy-appengine.md)
7 | * [GitHub Pages](https://github.com/yeoman/generator-gulp-webapp/blob/master/docs/recipes/gh-pages.md)
8 | * [Amazon AWS S3](https://github.com/yeoman/generator-gulp-webapp/blob/master/docs/recipes/aws-s3-deployment.md)
9 | * [Heroku](https://github.com/yeoman/generator-gulp-webapp/blob/master/docs/recipes/node-heroku.md)
10 |
--------------------------------------------------------------------------------
/docs/file-appendix.md:
--------------------------------------------------------------------------------
1 |
2 | ## .babelrc
3 |
4 | [.babelrc](https://babeljs.io/docs/usage/babelrc/) is a configuration file for passing options to [Babel](https://babeljs.io) - the ES2015 transpiler recommended for writing next-generation JavaScript in Web Starter Kit.
5 |
6 | ## .editorconfig
7 |
8 | [EditorConfig](http://editorconfig.org/) is a file format and collection of text editor plugins for maintaining consistent coding styles between different editors and IDEs.
9 |
10 | ## gulpfile.babel.js
11 |
12 | [Gulp](http://gulpjs.com) is a streaming build system that allows you to automate tedious development tasks. Compared with other build systems, such as Grunt, gulp uses Node.js streams as a means to automate tasks, thereby removing the need to create intermediate files when transforming source files.
13 |
14 | In gulp, you would install plugins, that do one thing and do it well, and construct a 'pipeline' by connecting them to each other. A `gulpfile` allows you to put together tasks that use plugins to accomplish a task like minification.
15 |
16 | `gulpfile.babel.js` is a gulpfile written in ES2015. The `babel` portion of the name refers to its use of the [Babel](https://babeljs.io) transpiler for enabling ES2015 code to run there.
17 |
18 | ## app/scripts/main.js
19 |
20 | This is a file where your custom JavaScript can go.
21 |
22 | ## app/styles/main.css
23 |
24 | This is a file where your custom CSS can go. You can place any Sass you wish to have compiled into the `styles` directory and renaming `main.css` to `main.scss` will cause Web Starter Kit to treat the file as Sass instead.
25 |
26 | ## app/manifest.json
27 |
28 | `manifest.json` contains a [Web Application Manifest](https://w3c.github.io/manifest/) - a simple JSON file that gives you the ability to control how your app appears to the user in the areas that they would expect to see apps (for example the mobile home screen). In here you can control what the user can launch and more importantly how they can launch it.
29 |
30 | For more information on the manifest, see [Web Fundamentals](https://developers.google.com/web/updates/2014/11/Support-for-installable-web-apps-with-webapp-manifest-in-chrome-38-for-Android).
31 |
32 | ## app/manifest.webapp
33 |
34 | `manifest.webapp` refers to the proprietary [Firefox OS manifest format](https://developer.mozilla.org/en-US/Apps/Build/Manifest), and not the W3C [manifest spec](https://w3c.github.io/manifest/), designed for cross-browser open web applications.
35 |
36 | The Firefox OS app manifest provides information about an app (such as name, author, icon, and description) and a list of Web APIs that your app needs.
37 |
38 | This manifest included in Web Starter Kit until Firefox OS switches to using the manifest spec instead.
39 |
40 | ## package.json
41 |
42 | A [package.json](https://docs.npmjs.com/files/package.json) file is used to specify project tooling dependencies from [npm](http://npmjs.org) - the Node package manager. When you run `npm install`, `package.json` is read to discover what packages need to be installed.
43 |
44 | `package.json` can also contain other metadata such as a project description, version, license and configuration information.
45 |
46 | ## app/service-worker.js
47 |
48 | A [service worker](http://www.html5rocks.com/en/tutorials/service-worker/introduction/) is a script that is run by your browser in the background, separate from a web page, opening the door to features such as offline support. In Web Starter Kit, the `app/service-worker.js` script is automatically generated for you by our build process via [sw-precache](https://github.com/GoogleChrome/sw-precache/).
49 |
--------------------------------------------------------------------------------
/docs/install.md:
--------------------------------------------------------------------------------
1 | # Install
2 |
3 | **tl;dr**: [Download WSK](https://github.com/google/web-starter-kit/releases/latest) and run `$ npm install --global gulp && npm install` in that directory to get started.
4 |
5 | -
6 |
7 | To take advantage of Web Starter Kit you need to:
8 |
9 | 1. Get a copy of the code.
10 | 2. Install the dependencies if you don't already have them.
11 | 3. Modify the application to your liking.
12 | 4. Deploy your production code.
13 |
14 | ## Getting the code
15 |
16 | [Download](https://github.com/google/web-starter-kit/releases/latest) and extract WSK to where you want to work.
17 |
18 | ## Prerequisites
19 |
20 | ### [Node.js](https://nodejs.org)
21 |
22 | Bring up a terminal and type `node --version`.
23 | Node should respond with a version at or above 0.10.x.
24 | If you require Node, go to [nodejs.org](https://nodejs.org) and click on the big green Install button.
25 |
26 | ### [Gulp](http://gulpjs.com)
27 |
28 | Bring up a terminal and type `gulp --version`.
29 | If Gulp is installed it should return a version number at or above 3.9.x.
30 | If you need to install/upgrade Gulp, open up a terminal and type in the following:
31 |
32 | ```sh
33 | $ npm install --global gulp
34 | ```
35 |
36 | *This will install Gulp globally. Depending on your user account, you may need to [configure your system](https://github.com/sindresorhus/guides/blob/master/npm-global-without-sudo.md) to install packages globally without administrative privileges.*
37 |
38 |
39 | ### Local dependencies
40 |
41 | Next, install the local dependencies Web Starter Kit requires:
42 |
43 | ```sh
44 | $ npm install
45 | ```
46 |
47 | That's it! You should now have everything needed to use the Web Starter Kit.
48 |
49 | -
50 |
51 | You may also want to get used to some of the [commands](commands.md) available.
52 |
--------------------------------------------------------------------------------
/docs/mdl-sass.md:
--------------------------------------------------------------------------------
1 | ## Using Material Design Lite's Sass in Web Starter Kit
2 |
3 | If you would like to swap out the CSS version of [Material Design Lite](http://getmdl.io) for the more customisable [Sass](http://sass-lang.com/) version, there are a few steps you can take to get this setup with Web Starter Kit.
4 |
5 | > This guide is intended to be used with Web Starter Kit 0.6.0 and above.
6 |
7 | 1. Download the [latest release](https://github.com/google/web-starter-kit/releases/latest) of Web Starter Kit. Extract it to a location on your drive.
8 | 2. Download the [latest release](https://github.com/google/material-design-lite/releases/latest) build of Material Design Lite (`material-design-lite-.zip` where `version` is the latest version available). This file will include the Sass source files we need to get started.
9 | 3. Extract `material-design-lite-.zip` to a local folder on your drive and open it. You should see a file/folder structure similar to the below:
10 |
11 | ```
12 | ├── LICENSE
13 | ├── README.md
14 | ├── bower.json
15 | ├── gulpfile.js
16 | ├── material.css
17 | ├── material.js
18 | ├── material.min.css
19 | ├── material.min.css.map
20 | ├── material.min.js
21 | ├── material.min.js.map
22 | ├── package.json
23 | ├── src
24 | └── utils
25 | ```
26 |
27 | The `src` directory above contains MDL's Sass files and the JavaScript sources for all MDL components.
28 |
29 | 4. Copy the `src` directory from step 3. to Web Starter Kit's `app/styles` directory. Your folder structure for `app/styles` should now resemble:
30 |
31 | ```
32 | ├── main.css
33 | └── src
34 | ```
35 |
36 | Next we have some changes to make to Web Starter Kit's `app/index.html`. By default it includes the CDN-hosted production builds of Material Design Lite (e.g `https://storage.googleapis.com/code.getmdl.io/1.0.6/material.indigo-pink.min.css`) We will need to swap these out for references to our local files instead.
37 |
38 | 5. First, we'll switch the CDN-hosted stylesheets to our local version.
39 |
40 | Replace the following line:
41 |
42 | ```html
43 |
44 | ```
45 |
46 | with:
47 |
48 | ```html
49 |
50 | ```
51 |
52 | If you navigate to "app/styles/main.css" in your Text Editor (e.g Sublime Text), you will notice that it already contains some styles. These are for the default template that ships with Web Starter Kit.
53 |
54 | We're going to rename our `app/styles/main.css` file to `app/styles/main.scss` so that Web Starter Kit treats it as a Sass file. No further changes are required to our `app/index.html`.
55 |
56 | One final change for getting Sass working is adding the following line to the very top of `app/styles/main.scss`:
57 |
58 | ```
59 | @import "src/material-design-lite";
60 | ```
61 |
62 | This imports in all of MDL's component styles. If you later decide to only use a smallet set of components, just edit `src/material-design-lite.scss`, commenting out what you don't want.
63 |
64 | 6. Next, we'll localise our JavaScript files for MDL. Once again, we'll edit `app/index.html`:
65 |
66 | Remove:
67 |
68 | ```html
69 |
70 | ```
71 |
72 | and find the following block in `app/index.html`:
73 |
74 | ```html
75 |
76 |
77 |
78 | ```
79 |
80 | Replace the above block with the following code:
81 |
82 | ```html
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 | ```
103 |
104 | Then, in your `gulpfile.babel.js` (found in the root of Web Starter Kit), edit the `scripts` task. By default it will look something like this:
105 |
106 | ```js
107 | gulp.task('scripts', () =>
108 | gulp.src([
109 | // Note: Since we are not using useref in the scripts build pipeline,
110 | // you need to explicitly list your scripts here in the right order
111 | // to be correctly concatenated
112 | './app/scripts/main.js'
113 | ])
114 | ```
115 |
116 | We're just going to add in the MDL component scripts so that they're correctly copied over and minified into a build when running `gulp`:
117 |
118 | ```js
119 | gulp.task('scripts', () =>
120 | gulp.src([
121 | // Component handler
122 | './app/styles/src/mdlComponentHandler.js',
123 | // Base components
124 | './app/styles/src/button/button.js',
125 | './app/styles/src/checkbox/checkbox.js',
126 | './app/styles/src/icon-toggle/icon-toggle.js',
127 | './app/styles/src/menu/menu.js',
128 | './app/styles/src/progress/progress.js',
129 | './app/styles/src/radio/radio.js',
130 | './app/styles/src/slider/slider.js',
131 | './app/styles/src/spinner/spinner.js',
132 | './app/styles/src/switch/switch.js',
133 | './app/styles/src/tabs/tabs.js',
134 | './app/styles/src/textfield/textfield.js',
135 | './app/styles/src/tooltip/tooltip.js',
136 | // Complex components (which reuse base components)
137 | './app/styles/src/layout/layout.js',
138 | './app/styles/src/data-table/data-table.js',
139 | // And finally, the ripples
140 | './app/styles/src/ripple/ripple.js',
141 | // Other scripts,
142 | './app/scripts/main.js'
143 | ])
144 | ```
145 |
146 |
147 | > Note: We are aware that it can feel a little suboptimal to reference the same set of source files twice in the above pipeline. We wil be looking at simplifying this workflow in a future release.
148 |
149 | Similar to styles, you can comment out what you don't need here if you decide to only use a smaller set of components.
150 |
151 | 7. Finally, we can run `gulp serve` to preview our site or `gulp` to build a production version. Yay!
152 |
153 | ## Bonus tips
154 |
155 | ### Configuring colors
156 |
157 | You will probably want to configure the color theme used in MDL.
158 |
159 | MDL supports Material Design's [color palette](https://www.google.com/design/spec/style/color.html#color-color-palette) through Sass variables.
160 |
161 | If you find a color in the palette spec you would like to use e.g color name `Pink` with fill `500`, MDL exposes this as `$palette-pink-500`. Let's walk through customising the primary and accent colors for your theme.
162 |
163 | This can be done using your setup as follows:
164 |
165 | 1. Run `gulp serve` to preview your site.
166 | 2. Open `app/styles/src/_variables.scss` in your Text Editor.
167 | 3. Find `$color-primary`. It should be in the same block as two other color variables we can use for theming - `$color-primary-dark` and `$color-accent`.
168 |
169 | ```
170 | $color-primary: $palette-indigo-500 !default;
171 | $color-primary-dark: $palette-indigo-700 !default;
172 | $color-accent: $palette-pink-A200 !default;
173 | ```
174 |
175 | We can change out the default theme for a custom one by consulting `app/styles/src/_color-definitions.scss` for [Material Design color themes](https://www.google.com/design/spec/style/color.html) available.
176 |
177 | For this example, we're going to change out `palette-indigo-500` for `palette-purple-500` and `palette-indigo-700` for `palette-deep-purple-700`.
178 |
179 | ```
180 | $color-primary: $palette-purple-500 !default;
181 | $color-primary-dark: $palette-deep-purple-700 !default;
182 | $color-accent: $palette-pink-A200 !default;
183 | ```
184 |
185 | Make the above change and hit save. The page should refresh, now showing you your customised theme in action.
186 |
187 | For complete Material Design theming, you need to set two other colours: `$color-primary-contrast` and `$color-accent-contrast` in the same `app/styles/src/_variables.scss` file. These are the colours for text that is rendered on top of a solid block of primary or accent, respectively. You should set them to `$color-dark-contrast` if you've chosen a dark primary/accent, and `$color-light-contrast` if you've chosen a light primary/accent.
188 |
189 |
190 |
191 |
192 |
--------------------------------------------------------------------------------
/gulpfile.babel.js:
--------------------------------------------------------------------------------
1 | /**
2 | *
3 | * Web Starter Kit
4 | * Copyright 2015 Google Inc. All rights reserved.
5 | *
6 | * Licensed under the Apache License, Version 2.0 (the "License");
7 | * you may not use this file except in compliance with the License.
8 | * You may obtain a copy of the License at
9 | *
10 | * https://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing, software
13 | * distributed under the License is distributed on an "AS IS" BASIS,
14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | * See the License for the specific language governing permissions and
16 | * limitations under the License
17 | *
18 | */
19 |
20 | 'use strict';
21 |
22 | // This gulpfile makes use of new JavaScript features.
23 | // Babel handles this without us having to do anything. It just works.
24 | // You can read more about the new JavaScript features here:
25 | // https://babeljs.io/docs/learn-es2015/
26 |
27 | import path from 'path';
28 | import gulp from 'gulp';
29 | import del from 'del';
30 | import runSequence from 'run-sequence';
31 | import browserSync from 'browser-sync';
32 | import swPrecache from 'sw-precache';
33 | import gulpLoadPlugins from 'gulp-load-plugins';
34 | import {output as pagespeed} from 'psi';
35 | import pkg from './package.json';
36 |
37 | const $ = gulpLoadPlugins();
38 | const reload = browserSync.reload;
39 |
40 | // Lint JavaScript
41 | gulp.task('lint', () =>
42 | gulp.src('app/scripts/**/*.js')
43 | .pipe($.eslint())
44 | .pipe($.eslint.format())
45 | .pipe($.if(!browserSync.active, $.eslint.failOnError()))
46 | );
47 |
48 | // Optimize images
49 | gulp.task('images', () =>
50 | gulp.src('app/images/**/*')
51 | .pipe($.cache($.imagemin({
52 | progressive: true,
53 | interlaced: true
54 | })))
55 | .pipe(gulp.dest('dist/images'))
56 | .pipe($.size({title: 'images'}))
57 | );
58 |
59 | // Copy all files at the root level (app)
60 | gulp.task('copy', () =>
61 | gulp.src([
62 | 'app/*',
63 | '!app/*.html',
64 | 'node_modules/apache-server-configs/dist/.htaccess'
65 | ], {
66 | dot: true
67 | }).pipe(gulp.dest('dist'))
68 | .pipe($.size({title: 'copy'}))
69 | );
70 |
71 | // Compile and automatically prefix stylesheets
72 | gulp.task('styles', () => {
73 | const AUTOPREFIXER_BROWSERS = [
74 | 'ie >= 10',
75 | 'ie_mob >= 10',
76 | 'ff >= 30',
77 | 'chrome >= 34',
78 | 'safari >= 7',
79 | 'opera >= 23',
80 | 'ios >= 7',
81 | 'android >= 4.4',
82 | 'bb >= 10'
83 | ];
84 |
85 | // For best performance, don't add Sass partials to `gulp.src`
86 | return gulp.src([
87 | 'app/styles/**/*.scss',
88 | 'app/styles/**/*.css'
89 | ])
90 | .pipe($.newer('.tmp/styles'))
91 | .pipe($.sourcemaps.init())
92 | .pipe($.sass({
93 | precision: 10
94 | }).on('error', $.sass.logError))
95 | .pipe($.autoprefixer(AUTOPREFIXER_BROWSERS))
96 | .pipe(gulp.dest('.tmp/styles'))
97 | // Concatenate and minify styles
98 | .pipe($.if('*.css', $.cssnano()))
99 | .pipe($.size({title: 'styles'}))
100 | .pipe($.sourcemaps.write('./'))
101 | .pipe(gulp.dest('dist/styles'));
102 | });
103 |
104 | // Concatenate and minify JavaScript. Optionally transpiles ES2015 code to ES5.
105 | // to enables ES2015 support remove the line `"only": "gulpfile.babel.js",` in the
106 | // `.babelrc` file.
107 | gulp.task('scripts', () =>
108 | gulp.src([
109 | // Note: Since we are not using useref in the scripts build pipeline,
110 | // you need to explicitly list your scripts here in the right order
111 | // to be correctly concatenated
112 | './app/scripts/main.js'
113 | // Other scripts
114 | ])
115 | .pipe($.newer('.tmp/scripts'))
116 | .pipe($.sourcemaps.init())
117 | .pipe($.babel())
118 | .pipe($.sourcemaps.write())
119 | .pipe(gulp.dest('.tmp/scripts'))
120 | .pipe($.concat('main.min.js'))
121 | .pipe($.uglify({preserveComments: 'some'}))
122 | // Output files
123 | .pipe($.size({title: 'scripts'}))
124 | .pipe($.sourcemaps.write('.'))
125 | .pipe(gulp.dest('dist/scripts'))
126 | );
127 |
128 | // Scan your HTML for assets & optimize them
129 | gulp.task('html', () => {
130 | return gulp.src('app/**/*.html')
131 | .pipe($.useref({searchPath: '{.tmp,app}'}))
132 | // Remove any unused CSS
133 | .pipe($.if('*.css', $.uncss({
134 | html: [
135 | 'app/index.html'
136 | ],
137 | // CSS Selectors for UnCSS to ignore
138 | ignore: []
139 | })))
140 |
141 | // Concatenate and minify styles
142 | // In case you are still using useref build blocks
143 | .pipe($.if('*.css', $.cssnano()))
144 |
145 | // Minify any HTML
146 | .pipe($.if('*.html', $.htmlmin({
147 | removeComments: true,
148 | collapseWhitespace: true,
149 | collapseBooleanAttributes: true,
150 | removeAttributeQuotes: true,
151 | removeRedundantAttributes: true,
152 | removeEmptyAttributes: true,
153 | removeScriptTypeAttributes: true,
154 | removeStyleLinkTypeAttributes: true,
155 | removeOptionalTags: true
156 | })))
157 | // Output files
158 | .pipe($.if('*.html', $.size({title: 'html', showFiles: true})))
159 | .pipe(gulp.dest('dist'));
160 | });
161 |
162 | // Clean output directory
163 | gulp.task('clean', () => del(['.tmp', 'dist/*', '!dist/.git'], {dot: true}));
164 |
165 | // Watch files for changes & reload
166 | gulp.task('serve', ['scripts', 'styles'], () => {
167 | browserSync({
168 | notify: false,
169 | // Customize the Browsersync console logging prefix
170 | logPrefix: 'WSK',
171 | // Allow scroll syncing across breakpoints
172 | scrollElementMapping: ['main', '.mdl-layout'],
173 | // Run as an https by uncommenting 'https: true'
174 | // Note: this uses an unsigned certificate which on first access
175 | // will present a certificate warning in the browser.
176 | // https: true,
177 | server: ['.tmp', 'app'],
178 | port: 3000
179 | });
180 |
181 | gulp.watch(['app/**/*.html'], reload);
182 | gulp.watch(['app/styles/**/*.{scss,css}'], ['styles', reload]);
183 | gulp.watch(['app/scripts/**/*.js'], ['lint', 'scripts']);
184 | gulp.watch(['app/images/**/*'], reload);
185 | });
186 |
187 | // Build and serve the output from the dist build
188 | gulp.task('serve:dist', ['default'], () =>
189 | browserSync({
190 | notify: false,
191 | logPrefix: 'WSK',
192 | // Allow scroll syncing across breakpoints
193 | scrollElementMapping: ['main', '.mdl-layout'],
194 | // Run as an https by uncommenting 'https: true'
195 | // Note: this uses an unsigned certificate which on first access
196 | // will present a certificate warning in the browser.
197 | // https: true,
198 | server: 'dist',
199 | port: 3001
200 | })
201 | );
202 |
203 | // Build production files, the default task
204 | gulp.task('default', ['clean'], cb =>
205 | runSequence(
206 | 'styles',
207 | ['lint', 'html', 'scripts', 'images', 'copy'],
208 | 'generate-service-worker',
209 | cb
210 | )
211 | );
212 |
213 | // Run PageSpeed Insights
214 | gulp.task('pagespeed', cb =>
215 | // Update the below URL to the public URL of your site
216 | pagespeed('example.com', {
217 | strategy: 'mobile'
218 | // By default we use the PageSpeed Insights free (no API key) tier.
219 | // Use a Google Developer API key if you have one: http://goo.gl/RkN0vE
220 | // key: 'YOUR_API_KEY'
221 | }, cb)
222 | );
223 |
224 | // Copy over the scripts that are used in importScripts as part of the generate-service-worker task.
225 | gulp.task('copy-sw-scripts', () => {
226 | return gulp.src(['node_modules/sw-toolbox/sw-toolbox.js', 'app/scripts/sw/runtime-caching.js'])
227 | .pipe(gulp.dest('dist/scripts/sw'));
228 | });
229 |
230 | // See http://www.html5rocks.com/en/tutorials/service-worker/introduction/ for
231 | // an in-depth explanation of what service workers are and why you should care.
232 | // Generate a service worker file that will provide offline functionality for
233 | // local resources. This should only be done for the 'dist' directory, to allow
234 | // live reload to work as expected when serving from the 'app' directory.
235 | gulp.task('generate-service-worker', ['copy-sw-scripts'], () => {
236 | const rootDir = 'dist';
237 | const filepath = path.join(rootDir, 'service-worker.js');
238 |
239 | return swPrecache.write(filepath, {
240 | // Used to avoid cache conflicts when serving on localhost.
241 | cacheId: pkg.name || 'web-starter-kit',
242 | // sw-toolbox.js needs to be listed first. It sets up methods used in runtime-caching.js.
243 | importScripts: [
244 | 'scripts/sw/sw-toolbox.js',
245 | 'scripts/sw/runtime-caching.js'
246 | ],
247 | staticFileGlobs: [
248 | // Add/remove glob patterns to match your directory setup.
249 | `${rootDir}/images/**/*`,
250 | `${rootDir}/scripts/**/*.js`,
251 | `${rootDir}/styles/**/*.css`,
252 | `${rootDir}/*.{html,json}`
253 | ],
254 | // Translates a static file path to the relative URL that it's served from.
255 | stripPrefix: path.join(rootDir, path.sep)
256 | });
257 | });
258 |
259 | // Load custom tasks from the `tasks` directory
260 | // Run: `npm install --save-dev require-dir` from the command-line
261 | // try { require('require-dir')('tasks'); } catch (err) { console.error(err); }
262 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "devDependencies": {
3 | "apache-server-configs": "^2.7.1",
4 | "babel-core": "^6.0.15",
5 | "babel-preset-es2015": "^6.0.15",
6 | "browser-sync": "^2.9.0",
7 | "del": "^2.0.2",
8 | "eslint-config-google": "^0.3.0",
9 | "gulp": "^3.9.0",
10 | "gulp-autoprefixer": "^3.1.0",
11 | "gulp-babel": "^6.0.0",
12 | "gulp-cache": "0.2.2",
13 | "gulp-concat": "^2.5.2",
14 | "gulp-cssnano": "^2.0.0",
15 | "gulp-eslint": "^1.0.0",
16 | "gulp-htmlmin": "^1.3.0",
17 | "gulp-if": "^2.0.0",
18 | "gulp-imagemin": "^2.0.0",
19 | "gulp-load-plugins": "^1.0.0",
20 | "gulp-newer": "^1.0.0",
21 | "gulp-sass": "^2.0.0",
22 | "gulp-size": "^2.0.0",
23 | "gulp-sourcemaps": "^1.3.0",
24 | "gulp-uglify": "^1.0.1",
25 | "gulp-uncss": "^1.0.0",
26 | "gulp-useref": "^3.0.0",
27 | "psi": "^2.0.2",
28 | "run-sequence": "^1.0.1",
29 | "sw-precache": "^2.2.0",
30 | "sw-toolbox": "^3.0.1"
31 | },
32 | "engines": {
33 | "node": ">=0.12"
34 | },
35 | "private": true,
36 | "scripts": {
37 | "test": "gulp && git status | grep 'working directory clean' >/dev/null || (echo 'Please commit all changes generated by building'; exit 1)"
38 | },
39 | "eslintConfig": {
40 | "extends": "google"
41 | }
42 | }
43 |
--------------------------------------------------------------------------------