mirror of
https://github.com/jquery/jquery.git
synced 2024-11-23 02:54:22 +00:00
Include Sizzle and Qunit with bower. Fixes #14118.
This commit is contained in:
parent
c93f91e33e
commit
b13d8229ae
1
.gitignore
vendored
1
.gitignore
vendored
@ -12,3 +12,4 @@ dist/.destination.json
|
|||||||
dist/.sizecache.json
|
dist/.sizecache.json
|
||||||
build/.sizecache.json
|
build/.sizecache.json
|
||||||
node_modules
|
node_modules
|
||||||
|
bower_components
|
6
.gitmodules
vendored
6
.gitmodules
vendored
@ -1,6 +0,0 @@
|
|||||||
[submodule "src/sizzle"]
|
|
||||||
path = src/sizzle
|
|
||||||
url = git://github.com/jquery/sizzle.git
|
|
||||||
[submodule "test/qunit"]
|
|
||||||
path = test/qunit
|
|
||||||
url = git://github.com/jquery/qunit.git
|
|
@ -38,7 +38,7 @@ module.exports = function( grunt ) {
|
|||||||
selector: {
|
selector: {
|
||||||
destFile: "src/selector-sizzle.js",
|
destFile: "src/selector-sizzle.js",
|
||||||
apiFile: "src/sizzle-jquery.js",
|
apiFile: "src/sizzle-jquery.js",
|
||||||
srcFile: "src/sizzle/dist/sizzle.js"
|
srcFile: "bower_components/sizzle/dist/sizzle.js"
|
||||||
},
|
},
|
||||||
build: {
|
build: {
|
||||||
all: {
|
all: {
|
||||||
@ -584,13 +584,12 @@ module.exports = function( grunt ) {
|
|||||||
// Load grunt tasks from NPM packages
|
// Load grunt tasks from NPM packages
|
||||||
grunt.loadNpmTasks("grunt-compare-size");
|
grunt.loadNpmTasks("grunt-compare-size");
|
||||||
grunt.loadNpmTasks("grunt-git-authors");
|
grunt.loadNpmTasks("grunt-git-authors");
|
||||||
grunt.loadNpmTasks("grunt-update-submodules");
|
|
||||||
grunt.loadNpmTasks("grunt-contrib-watch");
|
grunt.loadNpmTasks("grunt-contrib-watch");
|
||||||
grunt.loadNpmTasks("grunt-contrib-jshint");
|
grunt.loadNpmTasks("grunt-contrib-jshint");
|
||||||
grunt.loadNpmTasks("grunt-contrib-uglify");
|
grunt.loadNpmTasks("grunt-contrib-uglify");
|
||||||
|
|
||||||
// Default grunt
|
// Default grunt
|
||||||
grunt.registerTask( "default", [ "update_submodules", "selector", "build:*:*", "jshint", "pre-uglify", "uglify", "post-uglify", "dist:*", "compare_size" ] );
|
grunt.registerTask( "default", [ "selector", "build:*:*", "jshint", "pre-uglify", "uglify", "post-uglify", "dist:*", "compare_size" ] );
|
||||||
|
|
||||||
// Short list as a high frequency watch task
|
// Short list as a high frequency watch task
|
||||||
grunt.registerTask( "dev", [ "selector", "build:*:*", "jshint" ] );
|
grunt.registerTask( "dev", [ "selector", "build:*:*", "jshint" ] );
|
||||||
|
65
README.md
65
README.md
@ -97,10 +97,10 @@ To create a custom build of the latest stable version, first check out the versi
|
|||||||
git pull; git checkout $(git describe --abbrev=0 --tags)
|
git pull; git checkout $(git describe --abbrev=0 --tags)
|
||||||
```
|
```
|
||||||
|
|
||||||
Then, make sure all Node dependencies are installed and all Git submodules are checked out:
|
Then, make sure all Node dependencies are installed:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
npm install && grunt
|
npm install
|
||||||
```
|
```
|
||||||
|
|
||||||
Create the custom build, use the `grunt custom` option, listing the modules to be excluded. Examples:
|
Create the custom build, use the `grunt custom` option, listing the modules to be excluded. Examples:
|
||||||
@ -173,72 +173,11 @@ Additionally, both methods can be combined.
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
Updating Submodules
|
|
||||||
-------------------
|
|
||||||
|
|
||||||
Update the submodules to what is probably the latest upstream code.
|
|
||||||
|
|
||||||
```bash
|
|
||||||
grunt update_submodules
|
|
||||||
```
|
|
||||||
|
|
||||||
Note: This task will also be run any time the default `grunt` command is used.
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Essential Git
|
Essential Git
|
||||||
-------------
|
-------------
|
||||||
|
|
||||||
As the source code is handled by the version control system Git, it's useful to know some features used.
|
As the source code is handled by the version control system Git, it's useful to know some features used.
|
||||||
|
|
||||||
### Submodules ###
|
|
||||||
|
|
||||||
The repository uses submodules, which normally are handled directly by the `grunt update_submodules` command, but sometimes you want to
|
|
||||||
be able to work with them manually.
|
|
||||||
|
|
||||||
Following are the steps to manually get the submodules:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
git clone https://github.com/jquery/jquery.git
|
|
||||||
cd jquery
|
|
||||||
git submodule init
|
|
||||||
git submodule update
|
|
||||||
```
|
|
||||||
|
|
||||||
Or:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
git clone https://github.com/jquery/jquery.git
|
|
||||||
cd jquery
|
|
||||||
git submodule update --init
|
|
||||||
```
|
|
||||||
|
|
||||||
Or:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
git clone --recursive https://github.com/jquery/jquery.git
|
|
||||||
cd jquery
|
|
||||||
```
|
|
||||||
|
|
||||||
If you want to work inside a submodule, it is possible, but first you need to checkout a branch:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
cd src/sizzle
|
|
||||||
git checkout master
|
|
||||||
```
|
|
||||||
|
|
||||||
After you've committed your changes to the submodule, you'll update the jquery project to point to the new commit,
|
|
||||||
but remember to push the submodule changes before pushing the new jquery commit:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
cd src/sizzle
|
|
||||||
git push origin master
|
|
||||||
cd ..
|
|
||||||
git add src/sizzle
|
|
||||||
git commit
|
|
||||||
```
|
|
||||||
|
|
||||||
|
|
||||||
### cleaning ###
|
### cleaning ###
|
||||||
|
|
||||||
If you want to purge your working directory back to the status of upstream, following commands can be used (remember everything you've worked on is gone after these):
|
If you want to purge your working directory back to the status of upstream, following commands can be used (remember everything you've worked on is gone after these):
|
||||||
|
17
bower.json
Normal file
17
bower.json
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
{
|
||||||
|
"name": "jquery",
|
||||||
|
"version": "2.0.4-pre",
|
||||||
|
"ignore": [
|
||||||
|
"**/.*",
|
||||||
|
"build",
|
||||||
|
"speed",
|
||||||
|
"test",
|
||||||
|
"CONTRIBUTING.md",
|
||||||
|
"*.txt",
|
||||||
|
"bower.json"
|
||||||
|
],
|
||||||
|
"dependencies": {
|
||||||
|
"sizzle": "~1.10.4",
|
||||||
|
"qunit": "~1.11.0"
|
||||||
|
}
|
||||||
|
}
|
@ -23,13 +23,12 @@
|
|||||||
],
|
],
|
||||||
"dependencies": {},
|
"dependencies": {},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
"grunt": "0.4.1",
|
||||||
"grunt-compare-size": "~0.4.0",
|
"grunt-compare-size": "~0.4.0",
|
||||||
"grunt-git-authors": "1.2.0",
|
"grunt-git-authors": "1.2.0",
|
||||||
"grunt-update-submodules": "0.2.0",
|
"grunt-contrib-watch": "~0.4.4",
|
||||||
"grunt-contrib-watch": "0.3.1",
|
"grunt-contrib-jshint": "~0.6.0",
|
||||||
"grunt-contrib-jshint": "0.3.0",
|
"grunt-contrib-uglify": "~0.2.2",
|
||||||
"grunt-contrib-uglify": "0.2.0",
|
|
||||||
"grunt": "0.4.1",
|
|
||||||
"gzip-js": "0.3.1",
|
"gzip-js": "0.3.1",
|
||||||
"testswarm": "~1.1.0",
|
"testswarm": "~1.1.0",
|
||||||
"archiver": "~0.4.2"
|
"archiver": "~0.4.2"
|
||||||
|
@ -1 +0,0 @@
|
|||||||
Subproject commit 70f333eb1f62a779bffa748543b36093e8832bd0
|
|
@ -4,7 +4,7 @@
|
|||||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||||
<meta http-equiv="X-UA-Compatible" content="IE=Edge" />
|
<meta http-equiv="X-UA-Compatible" content="IE=Edge" />
|
||||||
<title>jQuery Test Suite</title>
|
<title>jQuery Test Suite</title>
|
||||||
<link rel="Stylesheet" media="screen" href="qunit/qunit/qunit.css" />
|
<link rel="Stylesheet" media="screen" href="../bower_components/qunit/qunit.css" />
|
||||||
<link rel="Stylesheet" media="screen" href="data/testsuite.css" />
|
<link rel="Stylesheet" media="screen" href="data/testsuite.css" />
|
||||||
<!-- Includes -->
|
<!-- Includes -->
|
||||||
|
|
||||||
@ -13,7 +13,7 @@
|
|||||||
|
|
||||||
<script src="data/testinit.js"></script>
|
<script src="data/testinit.js"></script>
|
||||||
|
|
||||||
<script src="qunit/qunit/qunit.js"></script>
|
<script src="../bower_components/qunit/qunit.js"></script>
|
||||||
<script>
|
<script>
|
||||||
(function() {
|
(function() {
|
||||||
var src = "../dist/jquery.min.js";
|
var src = "../dist/jquery.min.js";
|
||||||
@ -69,7 +69,7 @@
|
|||||||
|
|
||||||
<!-- Subproject tests must be last because they replace our test fixture -->
|
<!-- Subproject tests must be last because they replace our test fixture -->
|
||||||
<script>
|
<script>
|
||||||
testSubproject( "Sizzle", "../src/sizzle/test/", /^unit\/.*\.js$/ );
|
testSubproject( "Sizzle", "../bower_components/sizzle/test/", /^unit\/.*\.js$/ );
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
@ -1 +0,0 @@
|
|||||||
Subproject commit 6ca3721222109997540bd6d9ccd396902e0ad2f9
|
|
Loading…
Reference in New Issue
Block a user