New develop.svn.wordpress.org repository based on the old core.svn repository.
* All WordPress files move to a src/ directory. * New task runner (Grunt), configured to copy a built WordPress to build/. * svn:ignore and .gitignore for Gruntfile.js, wp-config.php, and node.js. * Remove Akismet external from develop.svn. Still exists in core.svn. * Drop minified files from src/. The build process will now generate these. props koop. see #24976. and see http://wp.me/p2AvED-1AI. git-svn-id: https://develop.svn.wordpress.org/trunk@25001 602fd350-edb4-49c9-b593-d223f7449a82
20
.gitignore
vendored
Normal file
@ -0,0 +1,20 @@
|
||||
lib-cov
|
||||
*.seed
|
||||
*.log
|
||||
*.csv
|
||||
*.dat
|
||||
*.out
|
||||
*.pid
|
||||
*.gz
|
||||
|
||||
pids
|
||||
logs
|
||||
results
|
||||
|
||||
wp-config.php
|
||||
|
||||
node_modules
|
||||
npm-debug.log
|
||||
|
||||
# The WordPress output directory.
|
||||
build
|
155
Gruntfile.js
Normal file
@ -0,0 +1,155 @@
|
||||
/*global module:false*/
|
||||
module.exports = function(grunt) {
|
||||
var path = require('path');
|
||||
var SOURCE_DIR = 'src/';
|
||||
var BUILD_DIR = 'build/';
|
||||
|
||||
// Project configuration.
|
||||
grunt.initConfig({
|
||||
clean: {
|
||||
all: [BUILD_DIR],
|
||||
dynamic: {
|
||||
dot: true,
|
||||
expand: true,
|
||||
cwd: BUILD_DIR,
|
||||
src: []
|
||||
},
|
||||
svn: [SOURCE_DIR]
|
||||
},
|
||||
copy: {
|
||||
all: {
|
||||
dot: true,
|
||||
expand: true,
|
||||
cwd: SOURCE_DIR,
|
||||
src: ['**','!**/.{svn,git}/**'], // Ignore version control directories.
|
||||
dest: BUILD_DIR
|
||||
},
|
||||
dynamic: {
|
||||
dot: true,
|
||||
expand: true,
|
||||
cwd: SOURCE_DIR,
|
||||
dest: BUILD_DIR,
|
||||
src: []
|
||||
}
|
||||
},
|
||||
cssmin: {
|
||||
core: {
|
||||
expand: true,
|
||||
cwd: SOURCE_DIR,
|
||||
dest: BUILD_DIR,
|
||||
ext: '.min.css',
|
||||
src: [
|
||||
'wp-admin/css/*.css',
|
||||
'wp-includes/css/*.css',
|
||||
// Exceptions
|
||||
'!wp-admin/css/farbtastic.css'
|
||||
]
|
||||
}
|
||||
},
|
||||
svn: {
|
||||
core: {
|
||||
repository: 'https://core.svn.wordpress.org/trunk/',
|
||||
dest: SOURCE_DIR
|
||||
}
|
||||
},
|
||||
uglify: {
|
||||
core: {
|
||||
expand: true,
|
||||
cwd: SOURCE_DIR,
|
||||
dest: BUILD_DIR,
|
||||
ext: '.min.js',
|
||||
src: [
|
||||
'wp-admin/js/*.js',
|
||||
'wp-includes/js/*.js',
|
||||
'wp-includes/js/plupload/handlers.js',
|
||||
'wp-includes/js/plupload/wp-plupload.js',
|
||||
'wp-includes/js/tinymce/plugins/wp*/js/*.js',
|
||||
// Exceptions
|
||||
'!wp-admin/js/custom-header.js', // Why? We should minify this.
|
||||
'!wp-admin/js/farbtastic.js',
|
||||
'!wp-admin/js/iris.min.js',
|
||||
'!wp-includes/js/backbone.min.js',
|
||||
'!wp-includes/js/swfobject.js',
|
||||
'!wp-includes/js/underscore.min.js'
|
||||
]
|
||||
},
|
||||
tinymce: {
|
||||
expand: true,
|
||||
cwd: SOURCE_DIR,
|
||||
dest: BUILD_DIR,
|
||||
src: [
|
||||
'wp-includes/js/tinymce/plugins/wordpress/editor_plugin_src.js',
|
||||
'wp-includes/js/tinymce/plugins/wp*/editor_plugin_src.js'
|
||||
],
|
||||
// TinyMCE plugins use a nonstandard naming scheme: plugin files are named
|
||||
// `editor_plugin_src.js`, and are compressed into `editor_plugin.js`.
|
||||
rename: function(destBase, destPath) {
|
||||
destPath = destPath.replace('/editor_plugin_src.js', '/editor_plugin.js');
|
||||
return path.join(destBase || '', destPath);
|
||||
}
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
all: {
|
||||
files: [
|
||||
SOURCE_DIR + '**',
|
||||
// Ignore version control directories.
|
||||
'!' + SOURCE_DIR + '**/.{svn,git}/**'
|
||||
],
|
||||
tasks: ['clean:dynamic', 'copy:dynamic'],
|
||||
options: {
|
||||
dot: true,
|
||||
spawn: false,
|
||||
interval: 2000
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
// Load tasks.
|
||||
grunt.loadNpmTasks('grunt-contrib-clean');
|
||||
grunt.loadNpmTasks('grunt-contrib-copy');
|
||||
grunt.loadNpmTasks('grunt-contrib-cssmin');
|
||||
grunt.loadNpmTasks('grunt-contrib-uglify');
|
||||
grunt.loadNpmTasks('grunt-contrib-watch');
|
||||
|
||||
// Register tasks.
|
||||
grunt.registerTask('build', ['clean:all', 'copy:all', 'cssmin:core',
|
||||
'uglify:core', 'uglify:tinymce']);
|
||||
|
||||
|
||||
// Add a temporary setup task for preparing the directory using existing repositories.
|
||||
grunt.registerTask('setup', ['clean:all', 'svn']);
|
||||
|
||||
// Add an svn task for checking out repositories.
|
||||
grunt.registerMultiTask('svn', 'Check out a Subversion repository.', function() {
|
||||
var done = this.async();
|
||||
var args = ['checkout', '--ignore-externals', this.data.repository];
|
||||
if (this.data.dest) {
|
||||
args.push(this.data.dest);
|
||||
}
|
||||
|
||||
grunt.util.spawn({
|
||||
cmd: 'svn',
|
||||
args: args,
|
||||
opts: {stdio: 'inherit'}
|
||||
}, done);
|
||||
});
|
||||
|
||||
// Default task.
|
||||
grunt.registerTask('default', ['build']);
|
||||
|
||||
// Add a listener to the watch task.
|
||||
//
|
||||
// On `watch:all`, automatically updates the `copy:dynamic` and `clean:dynamic`
|
||||
// configurations so that only the changed files are updated.
|
||||
grunt.event.on('watch', function(action, filepath, target) {
|
||||
if (target != 'all') return;
|
||||
|
||||
var relativePath = path.relative(SOURCE_DIR, filepath);
|
||||
var cleanSrc = (action == 'deleted') ? [relativePath] : [];
|
||||
var copySrc = (action == 'deleted') ? [] : [relativePath];
|
||||
grunt.config(['clean', 'dynamic', 'src'], cleanSrc);
|
||||
grunt.config(['copy', 'dynamic', 'src'], copySrc);
|
||||
});
|
||||
};
|
19
package.json
Normal file
@ -0,0 +1,19 @@
|
||||
{
|
||||
"name": "WordPress",
|
||||
"version": "3.7.0",
|
||||
"description": "WordPress is web software you can use to create a beautiful website or blog.",
|
||||
"repository": {
|
||||
"type": "svn",
|
||||
"url": "https://develop.svn.wordpress.org/trunk"
|
||||
},
|
||||
"author": "The WordPress Contributors",
|
||||
"license": "GPLv2 or later",
|
||||
"devDependencies": {
|
||||
"grunt": "~0.4.1",
|
||||
"grunt-contrib-clean": "~0.5.0",
|
||||
"grunt-contrib-copy": "~0.4.1",
|
||||
"grunt-contrib-cssmin": "~0.6.1",
|
||||
"grunt-contrib-uglify": "~0.2.2",
|
||||
"grunt-contrib-watch": "~0.5.1"
|
||||
}
|
||||
}
|
Before Width: | Height: | Size: 147 B After Width: | Height: | Size: 147 B |
Before Width: | Height: | Size: 546 B After Width: | Height: | Size: 546 B |
Before Width: | Height: | Size: 143 B After Width: | Height: | Size: 143 B |
Before Width: | Height: | Size: 554 B After Width: | Height: | Size: 554 B |
Before Width: | Height: | Size: 121 B After Width: | Height: | Size: 121 B |
Before Width: | Height: | Size: 417 B After Width: | Height: | Size: 417 B |
Before Width: | Height: | Size: 142 B After Width: | Height: | Size: 142 B |
Before Width: | Height: | Size: 509 B After Width: | Height: | Size: 509 B |
Before Width: | Height: | Size: 863 B After Width: | Height: | Size: 863 B |
Before Width: | Height: | Size: 719 B After Width: | Height: | Size: 719 B |
Before Width: | Height: | Size: 761 B After Width: | Height: | Size: 761 B |
Before Width: | Height: | Size: 243 B After Width: | Height: | Size: 243 B |
Before Width: | Height: | Size: 243 B After Width: | Height: | Size: 243 B |
Before Width: | Height: | Size: 723 B After Width: | Height: | Size: 723 B |
Before Width: | Height: | Size: 461 B After Width: | Height: | Size: 461 B |
Before Width: | Height: | Size: 723 B After Width: | Height: | Size: 723 B |
Before Width: | Height: | Size: 243 B After Width: | Height: | Size: 243 B |
Before Width: | Height: | Size: 243 B After Width: | Height: | Size: 243 B |
Before Width: | Height: | Size: 507 B After Width: | Height: | Size: 507 B |
Before Width: | Height: | Size: 499 B After Width: | Height: | Size: 499 B |
Before Width: | Height: | Size: 400 B After Width: | Height: | Size: 400 B |
Before Width: | Height: | Size: 395 B After Width: | Height: | Size: 395 B |
Before Width: | Height: | Size: 259 B After Width: | Height: | Size: 259 B |
Before Width: | Height: | Size: 114 B After Width: | Height: | Size: 114 B |
Before Width: | Height: | Size: 992 B After Width: | Height: | Size: 992 B |
Before Width: | Height: | Size: 400 B After Width: | Height: | Size: 400 B |
Before Width: | Height: | Size: 719 B After Width: | Height: | Size: 719 B |
Before Width: | Height: | Size: 35 KiB After Width: | Height: | Size: 35 KiB |
Before Width: | Height: | Size: 37 KiB After Width: | Height: | Size: 37 KiB |
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 13 KiB |
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 13 KiB |
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 14 KiB |
Before Width: | Height: | Size: 6.8 KiB After Width: | Height: | Size: 6.8 KiB |
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 1003 B After Width: | Height: | Size: 1003 B |
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 2.5 KiB |
Before Width: | Height: | Size: 716 B After Width: | Height: | Size: 716 B |
Before Width: | Height: | Size: 338 B After Width: | Height: | Size: 338 B |
Before Width: | Height: | Size: 377 B After Width: | Height: | Size: 377 B |
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 2.0 KiB |
Before Width: | Height: | Size: 850 B After Width: | Height: | Size: 850 B |
Before Width: | Height: | Size: 206 B After Width: | Height: | Size: 206 B |
Before Width: | Height: | Size: 205 B After Width: | Height: | Size: 205 B |
Before Width: | Height: | Size: 245 B After Width: | Height: | Size: 245 B |
Before Width: | Height: | Size: 139 B After Width: | Height: | Size: 139 B |
Before Width: | Height: | Size: 323 B After Width: | Height: | Size: 323 B |
Before Width: | Height: | Size: 30 KiB After Width: | Height: | Size: 30 KiB |
Before Width: | Height: | Size: 92 B After Width: | Height: | Size: 92 B |
Before Width: | Height: | Size: 89 B After Width: | Height: | Size: 89 B |
Before Width: | Height: | Size: 29 KiB After Width: | Height: | Size: 29 KiB |
Before Width: | Height: | Size: 9.1 KiB After Width: | Height: | Size: 9.1 KiB |
Before Width: | Height: | Size: 9.0 KiB After Width: | Height: | Size: 9.0 KiB |
Before Width: | Height: | Size: 755 B After Width: | Height: | Size: 755 B |
Before Width: | Height: | Size: 2.7 KiB After Width: | Height: | Size: 2.7 KiB |
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 2.2 KiB |
Before Width: | Height: | Size: 7.3 KiB After Width: | Height: | Size: 7.3 KiB |
Before Width: | Height: | Size: 7.6 KiB After Width: | Height: | Size: 7.6 KiB |