Skip to content
This repository was archived by the owner on Aug 22, 2025. It is now read-only.

Commit 2548b3a

Browse files
Merge pull request #305 from rtCamp/build/update-packages
Update Node Packages
2 parents 5bd9c0d + a6e03d1 commit 2548b3a

File tree

11 files changed

+28450
-21381
lines changed

11 files changed

+28450
-21381
lines changed

.babelrc

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"presets": [
3-
[ "env", {
3+
[ "@babel/preset-env", {
44
"modules": false,
55
"targets": {
66
"browsers": [
@@ -19,17 +19,17 @@
1919
} ]
2020
],
2121
"plugins": [
22-
"transform-object-rest-spread",
23-
[ "transform-react-jsx", {
22+
"@babel/plugin-transform-object-rest-spread",
23+
[ "@babel/plugin-transform-react-jsx", {
2424
"pragma": "wp.element.createElement"
2525
} ]
2626
],
2727
"env": {
2828
"default": {
2929
"plugins": [
3030
"lodash",
31-
"transform-runtime"
31+
"@babel/plugin-transform-runtime"
3232
]
33-
},
33+
}
3434
}
35-
}
35+
}

.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v13.1.0
1+
v20.18.1

Gruntfile.js

Lines changed: 29 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@ module.exports = function( grunt ) {
66
require( 'load-grunt-tasks' )( grunt );
77

88
grunt.initConfig( {
9-
// Watch for changes and trigger autoprefixer, cssmin and uglify
10-
// Ref. https://www.npmjs.com/package/grunt-contrib-watch
9+
// Watch for changes and trigger postcss, cssmin and uglify
10+
// Ref. https://www.npmjs.com/package/grunt-contrib-watch
1111
watch: {
1212
css: {
13-
files: [ 'admin/css/rt-transcoder-admin.css' ],
14-
tasks: [ 'autoprefixer', 'cssmin' ]
13+
files: [ 'admin/css/rt-transcoder-admin.css', 'admin/css/rt-transcoder-client.css' ],
14+
tasks: [ 'postcss', 'cssmin' ]
1515
},
1616
js: {
1717
files: [
@@ -35,15 +35,15 @@ module.exports = function( grunt ) {
3535
}
3636
}
3737
},
38-
// Autoprefixer - Parse CSS and add vendor-prefixed CSS properties using the Can I Use database.
39-
// Ref. https://www.npmjs.com/package/grunt-autoprefixer
40-
autoprefixer: {
38+
// PostCSS with autoprefixer
39+
// Ref. https://www.npmjs.com/package/grunt-postcss
40+
postcss: {
41+
options: {
42+
config: {
43+
path: './postcss.config.js'
44+
}
45+
},
4146
dist: {
42-
options: {
43-
browsers: [ 'last 2 versions', 'ie 9', 'ie 10', 'ios 6', 'android 4' ],
44-
expand: true,
45-
flatten: true
46-
},
4747
files: {
4848
'admin/css/rt-transcoder-admin.css': 'admin/css/rt-transcoder-admin.css',
4949
'admin/css/rt-transcoder-client.css': 'admin/css/rt-transcoder-client.css'
@@ -94,11 +94,11 @@ module.exports = function( grunt ) {
9494
target: {
9595
files: [ {
9696
src: [
97-
'*.php',
98-
'**/*.php',
99-
'!node_modules/**',
100-
'!tests/**'
101-
], //All php
97+
'*.php',
98+
'**/*.php',
99+
'!node_modules/**',
100+
'!tests/**'
101+
], //All php
102102
expand: true
103103
} ]
104104
}
@@ -114,11 +114,11 @@ module.exports = function( grunt ) {
114114
mainFile: 'index.php', // Main project file.
115115
potFilename: 'transcoder.pot', // Name of the POT file.
116116
potHeaders: { // Headers to add to the generated POT file.
117-
poedit: true, // Includes common Poedit headers.
118-
'Last-Translator': 'Transcoder <support@rtcamp.com>',
119-
'Language-Team': 'Transcoder <support@rtcamp.com>',
120-
'report-msgid-bugs-to': 'http://community.rtcamp.com/',
121-
'x-poedit-keywordslist': true // Include a list of all possible gettext functions.
117+
poedit: true, // Includes common Poedit headers.
118+
'Last-Translator': 'Transcoder <support@rtcamp.com>',
119+
'Language-Team': 'Transcoder <support@rtcamp.com>',
120+
'report-msgid-bugs-to': 'http://community.rtcamp.com/',
121+
'x-poedit-keywordslist': true // Include a list of all possible gettext functions.
122122
},
123123
type: 'wp-plugin', // Type of project (wp-plugin or wp-theme).
124124
updateTimestamp: true // Whether the POT-Creation-Date should be updated without other changes.
@@ -127,6 +127,10 @@ module.exports = function( grunt ) {
127127
}
128128

129129
} );
130-
// Register task
131-
grunt.registerTask( 'default', [ 'autoprefixer', 'cssmin', 'uglify', 'checktextdomain', 'makepot', 'watch' ] );
132-
};
130+
// Register default task
131+
grunt.registerTask( 'default', [ 'postcss', 'cssmin', 'uglify', 'checktextdomain', 'makepot' ] );
132+
// Register a CSS-only task
133+
grunt.registerTask( 'css', [ 'postcss', 'cssmin' ] );
134+
// Register a JS-only task
135+
grunt.registerTask( 'js', [ 'uglify' ] );
136+
};

0 commit comments

Comments
 (0)