Created
January 28, 2014 02:08
-
-
Save mason-stewart/8661209 to your computer and use it in GitHub Desktop.
Run `npm install --save grunt-cdn`, and then add these bits to Gruntfile.js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
grunt.initConfig({ | |
// ... | |
cdn: { | |
options: { | |
/** @required - root URL of your CDN (may contains sub-paths as shown below) */ | |
cdn: 'https://YOUR-USERNAME.github.io/YOUR-REPO/', | |
/** @optional - if provided both absolute and relative paths will be converted */ | |
flatten: true | |
/** @optional - if provided will be added to the default supporting types */ | |
// supportedTypes: { 'phtml': 'html' } | |
}, | |
dist: { | |
/** @required - string (or array of) including grunt glob variables */ | |
src: ['./dist/*.html', './dist/styles/{,*/}*{,*/}*.css'] | |
/** @optional - if provided a copy will be stored without modifying original file */ | |
// dest: './dist/static/' | |
} | |
} | |
//... | |
}) | |
grunt.registerTask('build', [ | |
//... | |
'cdn:dist' | |
]); | |
grunt.loadNpmTasks('grunt-cdn'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment