- Favicons will be moved to the root directory during the build process to improve browser compatibility
To upgrade, remove /favicon
from any link
and meta
paths in your index.html
file. Additionally, remove the favicon.ico
include line entirely, as its presence in the root makes this line redundant and occasionally problematic in some browsers.
- Adds support to inline the content of SVGs directly into page HTML
- Updated to support JSHint ~2.9.0, most notably the
esversion
property
- Local files were not functionally equivalent to deployed code which made testing problematic
- Fixes svg_sprite task, updates peer dep as well
- Includes package name in email and Slack notifications
This is not included in deployment by default in this release, so to use, after deployment runs:
grunt notification_slack --env=dev --slacktoken=$SLACK_TOKEN
In the above replace dev
with whatever the environment is and set an environment variable with a Slack API Token which you can generate from the bottom of this page.
Setting "notification.slackChannel" for each environment in env.json
is also required.
A quick reference to the big changes for v6:
- transition to Browserify from Bower
- drop support for less than Node v4
- drop
grunt/env.js
for/env.json
and better environment support - switch
grunt-replace
wrap from{{ }}
to<< >>
- reorganize
package.json
and grunt alias scripts - run tests on separate instrumented folder and port
- separate deployment tasks (
uglify
,svgmin
,filerev
) from mainbuild
- remove Karma unit testing from default
npm test
, available as an option ( TODO ) - deployment changes that affect AWS settings
To upgrade:
- point to v6.0.x of
dominatr-grunt
- update
package.json
devDependencies and scripts to v6 ofdominatr
- move all bower install components to
package.json
dependencies - replace these files with their
dominatr
v6 counterpart:- gruntfile.js
- run-build.sh
- .drone.yml
- .gitignore
- create
env.json
in root directory and movegrunt/env.js
values to it - move
grunt-replace
values toenv.json
, change all replace references to<< >>
wrapping - browserify module structure, see
dominatr
for example structure - update
index.html
to use singledist.js
output - link third party library css files in
main.less
- remove
/build
root from all resource references (html, css, fonts, js) - delete unnecessary files:
- bower.json
- .bowerrc
- source/components/
- grunt/
- server.js
npm install
npm start
- make changes on cloudfront distributions to reference
/index.html
instead of/build/index.html
- General > Default Root Object
- Error Pages > 403 > Response Page Path
Delete releases 5.0.2
and 5.0.3
due to a dependency breaking change. Updates for autoprefixer
will be included in a 6.0.0
release. Also moved CHANGELOG out of README.md
and into own file.
Added MIT license
autoprefixer-core
was deprecated after components merged into autoprefixer
6.0
watch file should refer to envLocal
The reference to sitemap.txt that is in the robots.txt file requires the hostname, which should be added to the envProd
task in grunt/env.js
like this:
grunt.config( "Host", "<http(s)://www.domain.com>" );
Also in grunt/env.js
, the envDev
task should be renamed envLocal
.
If a development deployment is required, an envDev
task should be added to grunt/env.js
:
grunt.registerTask( "envDev", "Set environment variables for dev deployment", function ()
{
grunt.config( "aws.s3Bucket", "<s3-bucket-name>" );
grunt.config( "aws.cloudfrontDistributionId", "<cloudfront-dist-id>" );
grunt.config( "APIRoot", "<dev-api-path>" );
} );
And the above is then used from .drone.yml
by replacing deploystaging
with deploydev
.
Resets the build folder after running tests.
Nothing is needed to upgrade, but to use LiveReload you will need a browser extension. Install one for your browser from here, and click the extension while grunt watch
is running.
To upgrade:
- remove all
?v={{ VERSION }}
strings from your project npm install grunt-filerev --save
npm install grunt-filerev-replace --save
To upgrade, make sure the jshint report you get when running local tests comes back clean. Projects that may have previously passed on drone will now fail if they have jshint errors.
Additionally, jshint will no longer fail tasks during grunt watch
.
To upgrade, replace all script
tag logic at the bottom of your index.html
file with the following:
<% if( useDist ) { %>
<script src="/build/dist.js?v={{ VERSION }}" defer></script>
<% } else { %>
<script src="/build/angular.js?v={{ VERSION }}"></script>
<script src="/build/components.js?v={{ VERSION }}"></script>
<% if( useSource ) { %>
<!-- include: "type": "js", "files": "build/modules/*/*.js" -->
<!-- include: "type": "js", "files": "build/modules/*/*/*.js" -->
<% } else { %>
<script src="/build/project.js?v={{ VERSION }}"></script>
<% } %>
<script src="/build/templates.js?v={{ VERSION }}"></script>
<% } %>
2.3.0 Add Grunt-newer and updates to jshint
To upgrade:
npm install grunt-newer --save
2.2.0 Add PostCSS and Autoprefixer
To upgrade:
npm install grunt-postcss autoprefixer-core --save
To upgrade:
npm install grunt-ejs --save
npm uninstall grunt-usemin --save
In index.html
replace script tag
<script src="/build/project.js?v={{ VERSION }}"></script>
with
<% if (useSource) { %>
<!-- include: "type": "js", "files": "build/modules/*/*.js" -->
<!-- include: "type": "js", "files": "build/modules/*/*/*.js" -->
<% } else { %>
<script src="/build/project.js?v={{ VERSION }}"></script>
<% } %>