update to 3.5.0

This commit is contained in:
zhanghua1831 2020-09-02 14:38:57 +08:00
parent 82eee2ca77
commit 321aeb2c99
8 changed files with 72 additions and 107 deletions

View File

@ -1,60 +0,0 @@
diff --git a/build/tasks/build.js b/build/tasks/build.js
index 69916bf..58e65ad 100644
--- a/build/tasks/build.js
+++ b/build/tasks/build.js
@@ -10,7 +10,6 @@ module.exports = function( grunt ) {
var fs = require( "fs" ),
requirejs = require( "requirejs" ),
- Insight = require( "insight" ),
pkg = require( "../../package.json" ),
srcFolder = __dirname + "/../../src/",
rdefineEnd = /\}\s*?\);[^}\w]*$/,
@@ -337,46 +336,16 @@ module.exports = function( grunt ) {
grunt.registerTask( "custom", function() {
var args = this.args,
modules = args.length ? args[ 0 ].replace( /,/g, ":" ) : "",
- done = this.async(),
- insight = new Insight( {
- trackingCode: "UA-1076265-4",
- pkg: pkg
- } );
+ done = this.async();
function exec( trackingAllowed ) {
- var tracks = args.length ? args[ 0 ].split( "," ) : [];
var defaultPath = [ "build", "custom" ];
- tracks = tracks.map( function( track ) {
- return track.replace( /\//g, "+" );
- } );
-
- if ( trackingAllowed ) {
-
- // Track individuals
- tracks.forEach( function( module ) {
- var path = defaultPath.concat( [ "individual" ], module );
-
- insight.track.apply( insight, path );
- } );
-
- // Track full command
- insight.track.apply( insight, defaultPath.concat( [ "full" ], tracks ) );
- }
-
grunt.task.run( [ "build:*:*" + ( modules ? ":" + modules : "" ), "uglify", "dist" ] );
done();
}
grunt.log.writeln( "Creating custom build...\n" );
- // Ask for permission the first time
- if ( insight.optOut === undefined ) {
- insight.askPermission( null, function( error, result ) {
- exec( result );
- } );
- } else {
- exec( !insight.optOut );
- }
} );
};

13
generate-source.sh Normal file
View File

@ -0,0 +1,13 @@
version=$1
rm -rf jquery-$version jquery-$version.tar.gz jquery_${version}_node_modules.tar.gz
wget https://github.com/jquery/jquery/archive/$version/jquery-$version.tar.gz
tar xf jquery-$version.tar.gz
pushd jquery-$version
npm install --save-dev
tar cfz ../jquery_${version}_node_modules.tar.gz node_modules
# Husky tries to install a git hook that doesn't play well with dist-git
npm uninstall husky
popd

Binary file not shown.

BIN
jquery-3.5.0.tar.gz Normal file

Binary file not shown.

Binary file not shown.

View File

@ -1,14 +1,15 @@
diff --git a/Gruntfile.js b/Gruntfile.js diff --git a/Gruntfile.js b/Gruntfile.js
index 12ae008..5d541f2 100644 index 486a0f3..5ff8cde 100644
--- a/Gruntfile.js --- a/Gruntfile.js
+++ b/Gruntfile.js +++ b/Gruntfile.js
@@ -12,8 +12,7 @@ module.exports = function( grunt ) { @@ -13,7 +13,6 @@ module.exports = function( grunt ) {
return data;
} }
- var fs = require( "fs" ), var fs = require( "fs" ),
- gzip = require( "gzip-js" ); - gzip = require( "gzip-js" ),
+ var fs = require( "fs" ); isTravis = process.env.TRAVIS,
travisBrowsers = process.env.BROWSERS && process.env.BROWSERS.split( "," );
--
2.23.0
if ( !grunt.option( "filename" ) ) {
grunt.option( "filename", "jquery.js" );

View File

@ -1,55 +1,62 @@
Name: js-jquery Name: js-jquery
Version: 3.2.1 Version: 3.5.0
Release: 5 Release: 1
Summary: jQuery is a fast, small, and feature-rich JavaScript library Summary: JavaScript DOM manipulation, event handling, and AJAX library
License: MIT BuildArch: noarch
%global ver_x %(echo %{version} | cut -d. -f1)
URL: https://jquery.com/ %global ver_y %(echo %{version} | cut -d. -f2)
Source0: https://github.com/jquery/jquery/archive/%{version}/jquery-%{version}.tar.gz %global ver_z %(echo %{version} | cut -d. -f3)
Patch0001: %{name}-disable-gzip-js.patch License: MIT
Patch0002: disable-insight-tracking.patch URL: https://jquery.com/
Source0: https://github.com/jquery/jquery/archive/%{version}/jquery-%{version}.tar.gz
BuildArch: noarch #Created by ./generate-source.sh <version>
BuildRequires: web-assets-devel nodejs-packaging js-sizzle-static npm(grunt-cli) Source1: jquery_%{version}_node_modules.tar.gz
BuildRequires: npm(grunt-contrib-uglify) nodejs-grunt >= 0.4.4-3 npm(shelljs) Source2: generate-source.sh
BuildRequires: npm(load-grunt-tasks) npm(requirejs) nodejs-strip-json-comments Patch1: %{name}-disable-gzip-js.patch
Requires: web-assets-filesystem BuildRequires: web-assets-devel nodejs-packaging
Provides: jquery = %{version}-%{release}
Provides: jquery = %{version}-%{release} %{name}-static = %{version}-%{release} Provides: %{name}-static = %{version}-%{release}
Provides: js-jquery3 = %{version}-%{release} js-jquery2-static = %{version}-%{release} Provides: %{name}%{ver_x} = %{version}-%{release}
Provides: %{name}%{ver_x}-static = %{version}-%{release}
Requires: web-assets-filesystem
Provides: bundled(sizzle) = 2.3.5
Provides: bundled(js-sizzle) = 2.3.5
%description %description
jQuery is a fast, small, and feature-rich JavaScript library. With easy-to-use APIs jQuery is a fast, small, and feature-rich JavaScript library. It makes things
(available in multiple browsers), iterating and manipulating HTML documents, event handling, like HTML document traversal and manipulation, event handling, animation, and
animation, and Ajax is much easier. With both versatility and extensibility, jQuery has changed Ajax much simpler with an easy-to-use API that works across a multitude of
the way millions of people write JavaScript. browsers. With a combination of versatility and extensibility, jQuery has
changed the way that millions of people write JavaScript.
%prep %prep
%autosetup -n jquery-%{version} -p1 %autosetup -n jquery-%{version} -v -p1
rm -rf dist/*
rm -rf dist/* src/sizzle tar xf %{SOURCE1}
install -Dp %{_jsdir}/sizzle/latest/sizzle.js src/sizzle/dist/sizzle.js
%build %build
%nodejs_symlink_deps --build ./node_modules/grunt-cli/bin/grunt -v 'build:*:*' uglify
grunt -v 'build:*:*' uglify
%check
./node_modules/grunt-cli/bin/grunt -v 'build:*:*' test:prepare test:fast
%install %install
install -d %{buildroot}%{_jsdir}/jquery/%{version} %global installdir %{buildroot}%{_jsdir}/jquery
cp -p dist/* %{buildroot}%{_jsdir}/jquery/%{version} mkdir -p %{installdir}/%{version}
cp -p dist/* %{installdir}/%{version}
install -d %{buildroot}%{_webassetdir} mkdir -p %{buildroot}%{_webassetdir}
ln -s ../javascript/jquery %{buildroot}%{_webassetdir}/jquery ln -s ../javascript/jquery %{buildroot}%{_webassetdir}/jquery
ln -s %{version} %{buildroot}%{_jsdir}/jquery/latest ln -s %{version} %{installdir}/latest
ln -s %{version} %{buildroot}%{_jsdir}/jquery/3 ln -s %{version} %{installdir}/%{ver_x}
ln -s %{version} %{buildroot}%{_jsdir}/jquery/3.2 ln -s %{version} %{installdir}/%{ver_x}.%{ver_y}
%files %files
%doc AUTHORS.txt CONTRIBUTING.md LICENSE.txt README.md
%{_jsdir}/jquery %{_jsdir}/jquery
%{_webassetdir}/jquery %{_webassetdir}/jquery
%doc AUTHORS.txt CONTRIBUTING.md LICENSE.txt README.md
%changelog %changelog
* Wed Sep 2 2020 zhanghua <zhanghua40@huawei.com> - 3.5.0-1
- update to 3.5.0
* Thu Dec 12 2019 duyeyu <duyeyu@huawei.com> - 3.2.1-5 * Thu Dec 12 2019 duyeyu <duyeyu@huawei.com> - 3.2.1-5
- init package - init package

4
js-jquery.yaml Normal file
View File

@ -0,0 +1,4 @@
version_control: github
src_repo: jquery/jquery
tag_pattern: "^"
seperator: "."