Making WordPress.org


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

Plugin Directory: Fix grunt build for the JS client.

Props ck3lee.
Fixes #4173.

File:
1 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};
Note: See TracChangeset for help on using the changeset viewer.