This repository has been archived by the owner on Apr 4, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 46
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #482 from cmc333333/package-files
Include templates, static files in python distro
- Loading branch information
Showing
7 changed files
with
286 additions
and
22 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
include CONTRIBUTING.md | ||
include TERMS.md | ||
include COPYING.txt | ||
include README.md | ||
graft regulations/templates | ||
graft regulations/static | ||
graft regulations/frontend-config |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"presets": [ | ||
"es2015", | ||
"react" | ||
] | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,162 @@ | ||
module.exports = function toExport(grunt) { | ||
grunt.initConfig({ | ||
|
||
/** | ||
* Pull in the package.json file so we can read its metadata. | ||
*/ | ||
pkg: grunt.file.readJSON('package.json'), | ||
|
||
/** | ||
* | ||
* Pull in config-specific vars | ||
* | ||
*/ | ||
config: grunt.file.readJSON('config.json'), | ||
|
||
env: { | ||
dev: { | ||
NODE_ENV: 'development', | ||
}, | ||
dist: { | ||
NODE_ENV: 'production', | ||
}, | ||
}, | ||
|
||
/** | ||
* Copy dependencies into static paths | ||
*/ | ||
copy: { | ||
main: { | ||
files: [ | ||
{ | ||
expand: true, | ||
flatten: true, | ||
src: ['node_modules/respond.js/dest/*'], | ||
dest: '<%= config.frontEndPath %>/js/built/lib/respond/', | ||
filter: 'isFile', | ||
}, | ||
], | ||
}, | ||
}, | ||
|
||
/** | ||
* https://github.com/gruntjs/grunt-contrib-sass | ||
*/ | ||
sass: { | ||
dev: { | ||
options: { | ||
style: 'expanded', | ||
}, | ||
files: { | ||
'<%= config.frontEndPath %>/css/style.css': '<%= config.frontEndPath %>/css/scss/main.scss', | ||
}, | ||
}, | ||
}, | ||
|
||
/** | ||
* CSSMin: https://github.com/gruntjs/grunt-contrib-cssmin | ||
* | ||
* Minify CSS for production | ||
*/ | ||
cssmin: { | ||
target: { | ||
files: { | ||
'<%= config.frontEndPath %>/css/regulations.min.css': ['<%= config.frontEndPath %>/css/style.css'], | ||
}, | ||
}, | ||
}, | ||
/** | ||
* ESLint: https://github.com/sindresorhus/grunt-eslint | ||
* | ||
* Validate files with ESLint. | ||
*/ | ||
eslint: { | ||
target: [ | ||
'Gruntfile.js', | ||
'<%= config.frontEndPath %>/js/source/*.js', | ||
'<%= config.frontEndPath %>/js/source/events/**/*.js', | ||
'<%= config.frontEndPath %>/js/source/models/**/*.js', | ||
'<%= config.frontEndPath %>/js/source/views/**/*.js', | ||
'<%= config.frontEndPath %>/js/source/views/**/*.jsx', | ||
], | ||
}, | ||
|
||
/** | ||
* Browserify: | ||
* | ||
* Require('modules') in the browser/bundle up dependencies. | ||
*/ | ||
browserify: { | ||
dev: { | ||
files: { | ||
'<%= config.frontEndPath %>/js/built/regulations.js': ['<%= config.frontEndPath %>/js/source/regulations.js', '<%= config.frontEndPath %>/js/source/regulations.js'], | ||
}, | ||
options: { | ||
transform: ['babelify', 'browserify-shim'], | ||
browserifyOptions: { | ||
debug: true, | ||
}, | ||
}, | ||
}, | ||
dist: { | ||
files: { | ||
'<%= config.frontEndPath %>/js/built/regulations.min.js': ['<%= config.frontEndPath %>/js/source/regulations.js'], | ||
}, | ||
options: { | ||
transform: ['babelify', 'browserify-shim'], | ||
browserifyOptions: { | ||
debug: true, | ||
extensions: ['.js', '.jsx'], | ||
}, | ||
plugin: [ | ||
[function minifyify(b) { | ||
b.plugin('minifyify', { | ||
map: '/static/regulations/js/built/regulations.min.map', | ||
output: grunt.template.process('<%= config.frontEndPath %>/js/built/regulations.min.map'), | ||
}); | ||
}], | ||
], | ||
}, | ||
}, | ||
}, | ||
|
||
mocha_istanbul: { | ||
coverage: { | ||
src: ['<%= config.frontEndPath %>/js/unittests/specs/**/*.js'], | ||
options: { | ||
root: '<%= config.frontEndPath %>/js', | ||
scriptPath: require.resolve('isparta/lib/cli'), | ||
istanbulOptions: ['--include-all-sources'], | ||
mochaOptions: ['--compilers', 'js:babel-register'], | ||
nodeExec: require.resolve('.bin/babel-node'), | ||
coverageFolder: '<%= config.frontEndPath %>/js/unittests/coverage', | ||
coverage: false, | ||
}, | ||
}, | ||
}, | ||
}); | ||
|
||
/* eslint-disable global-require,import/no-extraneous-dependencies */ | ||
grunt.event.on('coverage', (lcov, done) => { | ||
require('coveralls').handleInput(lcov, (err) => { | ||
if (err) { | ||
done(err); | ||
} | ||
done(); | ||
}); | ||
}); | ||
/** | ||
* The above tasks are loaded here. | ||
*/ | ||
require('load-grunt-tasks')(grunt); | ||
/* eslint-enable */ | ||
|
||
/** | ||
* Create task aliases by registering new tasks | ||
*/ | ||
grunt.registerTask('test', ['eslint', 'mocha_istanbul']); | ||
grunt.registerTask('test-js', ['eslint', 'mocha_istanbul']); | ||
grunt.registerTask('build-dev', ['env:dev', 'copy', 'browserify:dev', 'sass']); | ||
grunt.registerTask('build-dist', ['env:dist', 'copy', 'browserify:dist', 'sass', 'cssmin']); | ||
grunt.registerTask('default', ['build-dist']); | ||
}; |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,101 @@ | ||
{ | ||
"name": "regulations-site", | ||
"version": "7.0.0", | ||
"homepage": "https://eregs.github.io/", | ||
"contributors": [ | ||
{ | ||
"name": "Consumer Financial Protection Bureau", | ||
"url": "http://cfpb.github.io/" | ||
}, | ||
{ | ||
"name": "18F", | ||
"url": "https://18f.gsa.gov/" | ||
} | ||
], | ||
"repository": { | ||
"type": "git", | ||
"url": "http://github.com/eregs/regulations-site.git" | ||
}, | ||
"bugs": { | ||
"url": "http://github.com/eregs/regulations-site/issues" | ||
}, | ||
"licenses": [ | ||
{ | ||
"type": "Public Domain", | ||
"url": "http://github.com/eregs/regulations-site/blob/master/TERMS.md" | ||
} | ||
], | ||
"engines": { | ||
"node": "6.9.2" | ||
}, | ||
"devDependencies": { | ||
"babel-cli": "^6.18.0", | ||
"babel-preset-es2015": "^6.18.0", | ||
"babel-preset-react": "^6.16.0", | ||
"babelify": "^7.3.0", | ||
"browserify": "^13.0.0", | ||
"browserify-shim": "^3.8.12", | ||
"chai": "^3.5.0", | ||
"coveralls": "^2.11.2", | ||
"deamdify": "^0.1.1", | ||
"eslint": "^3.12.2", | ||
"eslint-config-airbnb": "^13.0.0", | ||
"eslint-plugin-import": "^2.2.0", | ||
"eslint-plugin-jsx-a11y": "^2.2.3", | ||
"eslint-plugin-react": "^6.8.0", | ||
"expect.js": "~0.2.0", | ||
"grunt": "^0.4.5", | ||
"grunt-browserify": "^5.0.0", | ||
"grunt-contrib-copy": "^1.0.0", | ||
"grunt-contrib-cssmin": "^1.0.1", | ||
"grunt-env": "^0.4.4", | ||
"grunt-eslint": "^19.0.0", | ||
"grunt-mocha-istanbul": "^5.0.2", | ||
"grunt-sass": "^2.0.0", | ||
"grunt-shell": "^1.2.1", | ||
"isparta": "^4.0.0", | ||
"istanbul": "^0.4.2", | ||
"jsdom": "^8.1.0", | ||
"load-grunt-tasks": "^3.4.1", | ||
"minifyify": "^7.2.1", | ||
"mocha": "^3.2.0", | ||
"mocha-jsdom": "^1.1.0", | ||
"node-localstorage": "^1.3.0", | ||
"sinon": "^1.17.3", | ||
"sinon-chai": "^2.8.0", | ||
"watch": "^0.17.1" | ||
}, | ||
"keywords": [], | ||
"browser": { | ||
"jquery": "./node_modules/jquery/dist/jquery.js" | ||
}, | ||
"browserify-shim": { | ||
"jquery": { | ||
"exports": "jQuery" | ||
} | ||
}, | ||
"dependencies": { | ||
"backbone": "1.2.3", | ||
"backbone-query-parameters": "0.4.0", | ||
"backbone.localstorage": "1.1.16", | ||
"clipboard": "1.5.5", | ||
"datatables.net": "1.10.10", | ||
"filesize": "3.2.1", | ||
"jquery": "1.12.2", | ||
"jquery-lazyload": "1.9.7", | ||
"jquery-scrollstop": "1.2.0", | ||
"prosemirror": "0.4.0", | ||
"query-command-supported": "1.0.0", | ||
"react": "^15.4.1", | ||
"react-dom": "^15.4.1", | ||
"redux": "^3.6.0", | ||
"respond.js": "1.4.2", | ||
"underscore": "1.8.3", | ||
"urijs": "1.17.1" | ||
}, | ||
"config": { | ||
"travis-cov": { | ||
"threshold": 70 | ||
} | ||
} | ||
} |
This file contains 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