package init

This commit is contained in:
shenlz4050 2020-08-28 12:11:03 +08:00
parent b888f44dd3
commit 6f2a476a8b
4 changed files with 67 additions and 0 deletions

View File

@ -0,0 +1,14 @@
diff --git a/Gruntfile.js b/Gruntfile.js
index 43382c1..bfe8d33 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -1,8 +1,7 @@
module.exports = function( grunt ) {
"use strict";
- var gzip = require( "gzip-js" ),
- isBrowserStack = process.env.BROWSER_STACK_USERNAME && process.env.BROWSER_STACK_ACCESS_KEY,
+ var isBrowserStack = process.env.BROWSER_STACK_USERNAME && process.env.BROWSER_STACK_ACCESS_KEY,
browsers = {
phantom: [ "PhantomJS" ],
desktop: [],

49
js-sizzle.spec Normal file
View File

@ -0,0 +1,49 @@
%global commit 2280ab78b0e19dc494f9c47fd1f4a42dd63c280d
%global shortcommit %(c=%{commit}; echo ${c:0:7})
Name: js-sizzle
Version: 2.1.1
Release: 1
Summary: A pure-JavaScript CSS selector engine
BuildArch: noarch
%global ver_x %(echo %{version} | cut -d. -f1)
%global ver_y %(echo %{version} | cut -d. -f2)
%global ver_z %(echo %{version} | cut -d. -f3)
License: MIT
URL: http://sizzlejs.com/
Source0: https://github.com/jquery/sizzle/archive/%{commit}/%{name}-%{commit}.tar.gz
# disable gzip-js during build
Patch1: %{name}-disable-gzip-js.patch
BuildRequires: web-assets-devel nodejs-packaging
Provides: %{name}-static = %{version}-%{release}
Obsoletes: %{name}-source < %{version}
BuildRequires: nodejs-grunt >= 0.4.4-3 npm(grunt-cli) npm(grunt-contrib-uglify)
BuildRequires: npm(load-grunt-tasks)
Requires: web-assets-filesystem
%description
A pure-JavaScript CSS selector engine designed to be easily dropped in to a host
library.
%prep
%setup -qn sizzle-%{commit}
%patch1 -p1
rm -rf dist/*
%build
%nodejs_symlink_deps --build
grunt -v compile uglify
%install
%global inslibdir %{buildroot}%{_jsdir}/sizzle
mkdir -p %{inslibdir}/%{version}
cp -p dist/* %{inslibdir}/%{version}
ln -s %{version} %{inslibdir}/latest
ln -s %{version} %{inslibdir}/%{ver_x}
ln -s %{version} %{inslibdir}/%{ver_x}.%{ver_y}
%files
%{_jsdir}/sizzle
%doc AUTHORS.txt CONTRIBUTING.md LICENSE.txt README.md
%changelog
* Thu Aug 20 2020 shenleizhao <shenleizhao@huawei.com> - 2.1.1-1
- package init

4
js-sizzle.yaml Normal file
View File

@ -0,0 +1,4 @@
version_control: github
src_repo: jquery/sizzle
tag_prefix: ""
separator: "."