WordPress.org

Making WordPress.org

Changeset 8708


Ignore:
Timestamp:
05/01/2019 07:07:48 AM (7 months ago)
Author:
dd32
Message:

Plugin Directory: Fix grunt build for the JS client.

Props ck3lee.
Fixes #4173.

Location:
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins/Gruntfile.js

    r7632 r8708  
    116116            options: { signature: false }
    117117        },
    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'
    122120        },
    123121        rtlcss: {
     
    183181        },
    184182        watch: {
     183            css: {
     184                files: ['**/*.scss', '../wporg/css/**/*scss', 'client/components/**/**.scss'],
     185                tasks: ['css']
     186            },
     187            scripts: {
     188                files: ['**/*.jsx'],
     189                tasks: ['webpack:build-dev'],
     190                options: {
     191                  atBegin: true,
     192                }
     193            },
    185194            eslint: {
    186195                files: ['<%= eslint.files %>'],
    187196                tasks: ['eslint']
    188             },
    189             css: {
    190                 files: ['**/*.scss', '../wporg/css/**/*scss', 'client/components/**/**.scss'],
    191                 tasks: ['css']
    192197            }
    193198        }
     
    201206    grunt.loadNpmTasks('grunt-eslint');
    202207    grunt.loadNpmTasks('grunt-contrib-watch');
    203     grunt.loadNpmTasks('grunt-shell');
     208    grunt.loadNpmTasks('grunt-curl');
    204209
    205210    grunt.registerTask('default', ['eslint', 'sass_globbing', 'sass', 'rtlcss:dynamic']);
    206211    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']);
    208213};
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins/README.md

    r4312 r8708  
    55```
    66npm install
    7 grunt webpack:watch # Build JS client.
    8 grunt watch # Run linters, build Sass, etc.
     7grunt watch # Run linters, build Sass, JS client, etc.
    98```
    109
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins/client/modules/api.js

    r5024 r8708  
    11import WPAPI from 'wpapi';
    22
    3 import routes from 'default-routes.json';
     3import routes from './default-routes.json';
    44
    55/** @type {Object} pluginDirectory Config variable */
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins/package.json

    r7632 r8708  
    3030    "grunt-contrib-jshint": "^1.0.0",
    3131    "grunt-contrib-watch": "^1.1.0",
     32    "grunt-curl": "^2.5.1",
    3233    "grunt-eslint": "^19.0.0",
    3334    "grunt-postcss": "~0.7.2",
     
    3536    "grunt-sass": "~3.0.1",
    3637    "grunt-sass-globbing": "^1.5.1",
    37     "grunt-shell": "^2.1.0",
    3838    "grunt-webpack": "^1.0.11",
    3939    "history": "^2.0.0",
     
    5959    "i18n-calypso": "^1.7.0",
    6060    "json-loader": "^0.5.4",
    61     "wpapi": "^1.0.0"
     61    "wpapi": "^1.2.1"
    6262  }
    6363}
Note: See TracChangeset for help on using the changeset viewer.