Skip to content

Commit

Permalink
Merge pull request #23 from xwp/develop
Browse files Browse the repository at this point in the history
Release 0.2.0
  • Loading branch information
westonruter committed Jan 3, 2017
2 parents ea2014f + f75f3e3 commit c9472b6
Show file tree
Hide file tree
Showing 59 changed files with 3,538 additions and 22,002 deletions.
11 changes: 0 additions & 11 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,3 @@ composer.lock
# Compiled files
*.min.js
*.min.css
*.compiled.js
*-browserified.js

/bower_components/react/*
!/bower_components/react/react-dom.js
!/bower_components/react/react-dom.min.js
/bower_components/react/*
!/bower_components/react/react.js
!/bower_components/react/react.min.js
/bower_components/redux/*
!/bower_components/redux/index.js
100 changes: 5 additions & 95 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,51 +7,6 @@ module.exports = function( grunt ) {

pkg: grunt.file.readJSON( 'package.json' ),

browserify: {

// http://stackoverflow.com/questions/34372877/how-to-bundle-multiple-javascript-libraries-with-browserify
options: {
browserifyOptions: {
debug: true
},
transform: [
[ 'babelify' ],
[ 'browserify-shim' ]
],
external: [
'react',
'react-dom'
],
banner: '/* THIS FILE IS GENERATED FROM BROWSERIFY. DO NOT EDIT DIRECTLY. */'
},
recent_posts_form: {
options: {
browserifyOptions: {
standalone: 'RecentPostsWidgetFormReactComponent'
}
},
files: {
'./js/widgets/recent-posts-widget-form-react-component-browserified.js': './js/widgets/recent-posts-widget-form-react-component.jsx'
}
},
recent_posts_widget: {
options: {
browserifyOptions: {
standalone: 'RecentPostsWidgetFrontendReactComponent'
}
},
files: {
'./js/widgets/recent-posts-widget-frontend-react-component-browserified.js': './js/widgets/recent-posts-widget-frontend-react-component.jsx'
}
}
},
watch: {
browserify: {
files: [ './js/**/*.jsx' ],
tasks: [ 'browserify' ]
}
},

// JavaScript linting with JSHint.
jshint: {
options: {
Expand All @@ -64,56 +19,17 @@ module.exports = function( grunt ) {
]
},

// Minify .js files.
uglify: {
options: {
preserveComments: false
},
core: {
files: [ {
expand: true,
cwd: 'js/',
src: [
'*.js',
'widgets/*.js',
'!*.min.js'
],
dest: 'js/',
ext: '.min.js'
} ]
}
},

// Minify .css files.
cssmin: {
core: {
files: [ {
expand: true,
cwd: 'css/',
src: [
'*.css',
'!*.min.css'
],
dest: 'css/',
ext: '.min.css'
} ]
}
},

// Build a deploy-able plugin
copy: {
build: {
src: [
'*.php',
'css/*',
'js/**',
'php/**',
'readme.txt',
'bower_components/react/react-dom.js',
'bower_components/react/react-dom.min.js',
'bower_components/react/react.js',
'bower_components/react/react.min.js',
'bower_components/redux/index.js'
'js/*',
'php/*',
'core-adapter-widgets/**',
'post-collection-widget/**',
'readme.txt'
],
dest: 'build',
expand: true,
Expand Down Expand Up @@ -167,12 +83,9 @@ module.exports = function( grunt ) {
// Load tasks
grunt.loadNpmTasks( 'grunt-contrib-clean' );
grunt.loadNpmTasks( 'grunt-contrib-copy' );
grunt.loadNpmTasks( 'grunt-contrib-cssmin' );
grunt.loadNpmTasks( 'grunt-contrib-jshint' );
grunt.loadNpmTasks( 'grunt-contrib-uglify' );
grunt.loadNpmTasks( 'grunt-shell' );
grunt.loadNpmTasks( 'grunt-wp-deploy' );
grunt.loadNpmTasks( 'grunt-browserify' );
grunt.loadNpmTasks( 'grunt-contrib-watch' );

// Register tasks
Expand All @@ -199,9 +112,6 @@ module.exports = function( grunt ) {

grunt.registerTask( 'build', [
'jshint',
'browserify',
'uglify',
'cssmin',
'readme',
'copy'
] );
Expand Down
15 changes: 0 additions & 15 deletions bower.json

This file was deleted.

Loading

0 comments on commit c9472b6

Please sign in to comment.