-
Notifications
You must be signed in to change notification settings - Fork 42
Fix build process #714
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Fix build process #714
Changes from 4 commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
6d2dc36
Fix ESM import issue
nmolham-godaddy 833baa2
Use correct `source-map` option name
nmolham-godaddy 4371b0c
Clean up and Fix POT file build process
nmolham-godaddy 56f78d2
Simplify returned configs
nmolham-godaddy 0a8bc94
Update report bug to header to github repo issues page
nmolham-godaddy ecefa67
Update report bug to header to github repo issues page
nmolham-godaddy File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 |
---|---|---|
@@ -1,26 +1,24 @@ | ||
/* jshint node:true */ | ||
module.exports = function( grunt ) { | ||
module.exports = function () { | ||
'use strict'; | ||
|
||
var config = {}; | ||
|
||
// Compile CoffeeScript | ||
config.coffee = { | ||
compile: { | ||
options: { | ||
sourceMap: true | ||
}, | ||
files: [ | ||
{ | ||
expand: true, | ||
cwd: '<%= dirs.general.js %>/admin/', | ||
dest: '<%= dirs.general.js %>/admin/', | ||
src: '*.coffee', | ||
ext: '.min.js' | ||
} | ||
] | ||
return { | ||
coffee: { | ||
compile: { | ||
options: { | ||
sourceMap: true | ||
}, | ||
files: [ | ||
{ | ||
expand: true, | ||
cwd: '<%= dirs.general.js %>/admin/', | ||
dest: '<%= dirs.general.js %>/admin/', | ||
src: '*.coffee', | ||
ext: '.min.js' | ||
} | ||
] | ||
} | ||
} | ||
}; | ||
|
||
return config; | ||
}; |
This file contains hidden or 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 |
---|---|---|
@@ -1,25 +1,23 @@ | ||
/* jshint node:true */ | ||
module.exports = function( grunt ) { | ||
'use strict'; | ||
module.exports = function () { | ||
'use strict'; | ||
|
||
var config = {}; | ||
|
||
// The potomo task compiles PO files to MO files | ||
config.potomo = { | ||
framework: { | ||
options: { | ||
poDel: false, | ||
}, | ||
files: [{ | ||
expand: true, | ||
cwd: '<%= dirs.lang %>', | ||
src: ['*.po'], | ||
dest: '<%= dirs.lang %>', | ||
ext: '.mo', | ||
nonull: true | ||
}] | ||
} | ||
}; | ||
|
||
return config; | ||
// The potomo task compiles PO files to MO files | ||
return { | ||
potomo: { | ||
framework: { | ||
options: { | ||
poDel: false, | ||
}, | ||
files: [{ | ||
expand: true, | ||
cwd: '<%= dirs.lang %>', | ||
src: ['*.po'], | ||
dest: '<%= dirs.lang %>', | ||
ext: '.mo', | ||
nonull: true | ||
}] | ||
} | ||
} | ||
}; | ||
}; |
This file contains hidden or 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 |
---|---|---|
@@ -1,41 +1,39 @@ | ||
/* jshint node:true */ | ||
module.exports = function( grunt ) { | ||
module.exports = function () { | ||
'use strict'; | ||
|
||
var config = {}; | ||
|
||
// Compile all .scss files. | ||
config.sass = { | ||
compile: { | ||
options: { | ||
style: 'compressed', | ||
sourcemap: true | ||
}, | ||
files: [ | ||
{ | ||
expand: true, | ||
cwd: '<%= dirs.general.css %>/admin/', | ||
dest: '<%= dirs.general.css %>/admin/', | ||
src: ['*.scss', '!_*.scss'], | ||
ext: '.min.css' | ||
}, | ||
{ | ||
expand: true, | ||
cwd: '<%= dirs.gateway.css %>/admin/', | ||
dest: '<%= dirs.gateway.css %>/admin/', | ||
src: ['*.scss', '!_*.scss'], | ||
ext: '.min.css' | ||
return { | ||
sass: { | ||
compile: { | ||
options: { | ||
'style': 'compressed', | ||
'source-map': true | ||
}, | ||
{ | ||
expand: true, | ||
cwd: '<%= dirs.gateway.css %>/frontend/', | ||
dest: '<%= dirs.gateway.css %>/frontend/', | ||
src: ['*.scss', '!_*.scss'], | ||
ext: '.min.css' | ||
} | ||
] | ||
files: [ | ||
{ | ||
expand: true, | ||
cwd: '<%= dirs.general.css %>/admin/', | ||
dest: '<%= dirs.general.css %>/admin/', | ||
src: ['*.scss', '!_*.scss'], | ||
ext: '.min.css' | ||
}, | ||
{ | ||
expand: true, | ||
cwd: '<%= dirs.gateway.css %>/admin/', | ||
dest: '<%= dirs.gateway.css %>/admin/', | ||
src: ['*.scss', '!_*.scss'], | ||
ext: '.min.css' | ||
}, | ||
{ | ||
expand: true, | ||
cwd: '<%= dirs.gateway.css %>/frontend/', | ||
dest: '<%= dirs.gateway.css %>/frontend/', | ||
src: ['*.scss', '!_*.scss'], | ||
ext: '.min.css' | ||
} | ||
] | ||
} | ||
} | ||
}; | ||
|
||
return config; | ||
}; |
This file contains hidden or 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 |
---|---|---|
@@ -1,19 +1,30 @@ | ||
/* jshint node:true */ | ||
module.exports = function( grunt ) { | ||
module.exports = function () { | ||
'use strict'; | ||
|
||
var config = {}; | ||
let headers = { | ||
"Report-Msgid-Bugs-To": "https://wordpress.org/support/plugin/wc-plugin-framework", | ||
"Last-Translator": "[email protected]", | ||
"Language-Team": "[email protected]", | ||
"Project-Id-Version": "SkyVerge WooCommerce Plugin Framework" | ||
}; | ||
|
||
config.shell = { | ||
options: { | ||
execOptions: { | ||
maxBuffer: 1000 * 1000 * 1000, | ||
return { | ||
shell: { | ||
options: { | ||
execOptions: { | ||
maxBuffer: 1000 * 1000 * 1000, | ||
}, | ||
}, | ||
}, | ||
makepot: { | ||
command: 'wp i18n make-pot ./woocommerce ./woocommerce/i18n/languages/woocommerce-plugin-framework.pot --domain=woocommerce-plugin-framework --package-name=\'SkyVerge WooCommerce Plugin Framework\'' | ||
makepot: { | ||
command: [ | ||
'wp i18n make-pot . ./woocommerce/i18n/languages/woocommerce-plugin-framework.pot', | ||
'--include="woocommerce"', | ||
'--domain="woocommerce-plugin-framework"', | ||
`--headers='${JSON.stringify(headers)}'`, | ||
'--file-comment="Copyright (c) GoDaddy Operating Company, LLC. All Rights Reserved."' | ||
].join(' ') | ||
} | ||
} | ||
}; | ||
|
||
return config; | ||
}; |
This file contains hidden or 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 |
---|---|---|
@@ -1,31 +1,30 @@ | ||
/* jshint node:true */ | ||
module.exports = function( grunt ) { | ||
'use strict'; | ||
module.exports = async function (grunt) { | ||
'use strict'; | ||
|
||
var fs = require('fs'), | ||
gp = require('gettext-parser'), | ||
util = grunt.option( 'util' ); | ||
const fs = await import('fs'), | ||
gp = await import('gettext-parser'); | ||
|
||
// Parse and adjust PO headers. | ||
grunt.registerTask( 'parsepo', 'Custom parse PO task.', function () { | ||
// Parse and adjust PO headers. | ||
grunt.registerTask('parsepo', 'Custom parse PO task.', function () { | ||
|
||
var files = grunt.file.expand( grunt.config( 'dirs.lang' ) + '/*.po' ); | ||
let files = grunt.file.expand(grunt.config('dirs.lang') + '/*.po'); | ||
|
||
if ( ! files.length ) { | ||
return; | ||
} | ||
if (!files.length) { | ||
return; | ||
} | ||
|
||
files.forEach( function (file) { | ||
files.forEach(function (file) { | ||
|
||
var input = fs.readFileSync( file ), | ||
po = gp.po.parse( input ); | ||
let input = fs.readFileSync(file), | ||
po = gp.po.parse(input); | ||
|
||
// Set PO file headers to reflect the current version number. | ||
po.headers['project-id-version'] = grunt.config( 'pkg.title' ) + ' ' + grunt.config( 'pkg.version' ); | ||
// Set PO file headers to reflect the current version number. | ||
po.headers['project-id-version'] = grunt.config('pkg.title') + ' ' + grunt.config('pkg.version'); | ||
|
||
fs.writeFileSync( file, gp.po.compile( po ) ); | ||
} ); | ||
fs.writeFileSync(file, gp.po.compile(po)); | ||
}); | ||
|
||
} ); | ||
}); | ||
|
||
}; |
This file contains hidden or 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 |
---|---|---|
@@ -1,14 +1,14 @@ | ||
# Copyright (c) GoDaddy Operating Company, LLC. All Rights Reserved. | ||
msgid "" | ||
msgstr "" | ||
"Project-Id-Version: SkyVerge WooCommerce Plugin Framework 1.0.0 TODO: plugin version\n" | ||
"Project-Id-Version: SkyVerge WooCommerce Plugin Framework\n" | ||
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/wc-plugin-framework\n" | ||
"Last-Translator: [email protected]\n" | ||
"Language-Team: LANGUAGE <[email protected]>\n" | ||
"Language-Team: [email protected]\n" | ||
"MIME-Version: 1.0\n" | ||
"Content-Type: text/plain; charset=UTF-8\n" | ||
"Content-Transfer-Encoding: 8bit\n" | ||
"POT-Creation-Date: 2024-09-02T12:48:01+00:00\n" | ||
"POT-Creation-Date: 2024-09-04T04:05:23+00:00\n" | ||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" | ||
"X-Generator: WP-CLI 2.11.0\n" | ||
"X-Domain: woocommerce-plugin-framework\n" | ||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.