diff --git wordpress.org/public_html/wp-content/themes/pub/wporg-plugins/Gruntfile.js wordpress.org/public_html/wp-content/themes/pub/wporg-plugins/Gruntfile.js
index a858dacd4..1580c5611 100644
|
|
|
module.exports = function( grunt ) {
|
| 115 | 115 | }, |
| 116 | 116 | options: { signature: false } |
| 117 | 117 | }, |
| 118 | | shell: { |
| 119 | | build: { |
| 120 | | command: './node_modules/wpapi/lib/data/update-default-routes-json.js --endpoint=https://wordpress.org/plugins/wp-json --output=./client' |
| 121 | | } |
| | 118 | curl: { |
| | 119 | './client/modules/default-routes.json': 'https://wordpress.org/plugins/wp-json' |
| 122 | 120 | }, |
| 123 | 121 | rtlcss: { |
| 124 | 122 | options: { |
| … |
… |
module.exports = function( grunt ) {
|
| 189 | 187 | css: { |
| 190 | 188 | files: ['**/*.scss', '../wporg/css/**/*scss', 'client/components/**/**.scss'], |
| 191 | 189 | tasks: ['css'] |
| | 190 | }, |
| | 191 | scripts: { |
| | 192 | files: ['**/*.js', '**/*.jsx'], |
| | 193 | tasks: ['webpack:build'], |
| | 194 | options: { |
| | 195 | spawn: false, |
| | 196 | } |
| 192 | 197 | } |
| 193 | 198 | } |
| 194 | 199 | }); |
| … |
… |
module.exports = function( grunt ) {
|
| 200 | 205 | grunt.loadNpmTasks('grunt-webpack'); |
| 201 | 206 | grunt.loadNpmTasks('grunt-eslint'); |
| 202 | 207 | grunt.loadNpmTasks('grunt-contrib-watch'); |
| 203 | | grunt.loadNpmTasks('grunt-shell'); |
| | 208 | grunt.loadNpmTasks('grunt-curl'); |
| 204 | 209 | |
| 205 | 210 | grunt.registerTask('default', ['eslint', 'sass_globbing', 'sass', 'rtlcss:dynamic']); |
| 206 | 211 | grunt.registerTask('css', ['sass_globbing', 'sass', 'postcss', 'rtlcss:dynamic']); |
| 207 | | grunt.registerTask('build', ['webpack:build', 'css', 'shell:build']); |
| | 212 | grunt.registerTask('build', ['webpack:build', 'css', 'curl']); |
| 208 | 213 | }; |
diff --git wordpress.org/public_html/wp-content/themes/pub/wporg-plugins/README.md wordpress.org/public_html/wp-content/themes/pub/wporg-plugins/README.md
index 393ed9ec2..f7a3b79bd 100644
|
|
|
|
| 4 | 4 | |
| 5 | 5 | ``` |
| 6 | 6 | npm install |
| 7 | | grunt webpack:watch # Build JS client. |
| 8 | | grunt watch # Run linters, build Sass, etc. |
| | 7 | grunt watch # Run linters, build Sass, JS client, etc. |
| 9 | 8 | ``` |
| 10 | 9 | |
| 11 | 10 | #### Committing |
diff --git wordpress.org/public_html/wp-content/themes/pub/wporg-plugins/client/modules/api.js wordpress.org/public_html/wp-content/themes/pub/wporg-plugins/client/modules/api.js
index 083e91ead..35f69e73b 100644
|
|
|
|
| 1 | 1 | import WPAPI from 'wpapi'; |
| 2 | 2 | |
| 3 | | import routes from 'default-routes.json'; |
| | 3 | import routes from './default-routes.json'; |
| 4 | 4 | |
| 5 | 5 | /** @type {Object} pluginDirectory Config variable */ |
| 6 | 6 | const pluginDirectory = window.pluginDirectory || {}; |
diff --git wordpress.org/public_html/wp-content/themes/pub/wporg-plugins/package.json wordpress.org/public_html/wp-content/themes/pub/wporg-plugins/package.json
index 87f09f1cd..6447955ae 100644
|
|
|
|
| 29 | 29 | "grunt": "^1.0.3", |
| 30 | 30 | "grunt-contrib-jshint": "^1.0.0", |
| 31 | 31 | "grunt-contrib-watch": "^1.1.0", |
| | 32 | "grunt-curl": "^2.5.1", |
| 32 | 33 | "grunt-eslint": "^19.0.0", |
| 33 | 34 | "grunt-postcss": "~0.7.2", |
| 34 | 35 | "grunt-rtlcss": "^2.0.1", |
| 35 | 36 | "grunt-sass": "~3.0.1", |
| 36 | 37 | "grunt-sass-globbing": "^1.5.1", |
| 37 | | "grunt-shell": "^2.1.0", |
| 38 | 38 | "grunt-webpack": "^1.0.11", |
| 39 | 39 | "history": "^2.0.0", |
| 40 | 40 | "jquery": "^3.1.0", |
| … |
… |
|
| 58 | 58 | "dependencies": { |
| 59 | 59 | "i18n-calypso": "^1.7.0", |
| 60 | 60 | "json-loader": "^0.5.4", |
| 61 | | "wpapi": "^1.0.0" |
| | 61 | "wpapi": "^1.2.1" |
| 62 | 62 | } |
| 63 | 63 | } |