diff --git a/lodash-3.10.1.tar.gz b/lodash-3.10.1.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..c8ab82139b5d9e52b119c899bfca333ec92ecf7c Binary files /dev/null and b/lodash-3.10.1.tar.gz differ diff --git a/lodash-cli-3.10.1.tar.gz b/lodash-cli-3.10.1.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..c15097b8103653238fe9135e95714fd4db04baf3 Binary files /dev/null and b/lodash-cli-3.10.1.tar.gz differ diff --git a/lodash-compat-package.json b/lodash-compat-package.json new file mode 100644 index 0000000000000000000000000000000000000000..49470cabf5598fbd7dfb16023afef3f9f6d34f3a --- /dev/null +++ b/lodash-compat-package.json @@ -0,0 +1,21 @@ +{ + "name": "lodash-compat", + "version": "3.10.1", + "description": "The compatibility build of lodash modular utilities.", + "homepage": "https://lodash.com/", + "icon": "https://lodash.com/icon.svg", + "license": "MIT", + "main": "index.js", + "keywords": "compatibility, modules, stdlib, util", + "author": "John-David Dalton (http://allyoucanleet.com/)", + "contributors": [ + "John-David Dalton (http://allyoucanleet.com/)", + "Benjamin Tan (https://d10.github.io/)", + "Blaine Bublitz (http://www.iceddev.com/)", + "Kit Cambridge (http://kitcambridge.be/)", + "Mathias Bynens (https://mathiasbynens.be/)" + ], + "bugs": "https://github.com/lodash/lodash/issues", + "repository": "lodash/lodash-compat", + "scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" } +} diff --git a/lodash-modules-2.txt b/lodash-modules-2.txt new file mode 100644 index 0000000000000000000000000000000000000000..449258a2265a05880b4af820303487457a0923d8 --- /dev/null +++ b/lodash-modules-2.txt @@ -0,0 +1,35 @@ +take +takeright +takerightwhile +takewhile +template +templatesettings +throttle +times +toarray +_toiterable +_topath +toplainobject +transform +trim +trimleft +_trimmedleftindex +_trimmedrightindex +trimright +trunc +unescape +union +uniq +uniqueid +unzip +unzipwith +values +valuesin +where +without +words +wrap +xor +zip +zipobject +zipwith diff --git a/lodash-modules.txt b/lodash-modules.txt new file mode 100644 index 0000000000000000000000000000000000000000..9c5c47b682278cf545b70622c1c3a25219782694 --- /dev/null +++ b/lodash-modules.txt @@ -0,0 +1,222 @@ +add +after +_arraycopy +_arrayeach +_arrayevery +_arrayfilter +_arraymap +ary +assign +at +attempt +_baseassign +_baseat +_basecallback +_baseclone +_basecompareascending +_basecopy +_basecreate +_basedelay +_basedifference +_baseeach +_baseeachright +_basefilter +_basefind +_basefindindex +_baseflatten +_basefor +_baseforright +_basefunctions +_baseget +_baseindexof +_baseisequal +_baseismatch +_basematches +_basematchesproperty +_basepullat +_baserandom +_basereduce +_baseslice +_basesortby +_basesortbyorder +_basetostring +_baseuniq +_basevalues +before +_binaryindex +_binaryindexby +bind +bindall +_bindcallback +bindkey +_cacheindexof +callback +camelcase +capitalize +ceil +_charsleftindex +_charsrightindex +chunk +clone +clonedeep +compact +constant +countby +create +_createaggregator +_createassigner +_createcache +_createcompounder +_createpadding +_createwrapper +curry +curryright +debounce +deburr +defaults +defaultsdeep +defer +delay +difference +drop +dropright +droprightwhile +dropwhile +endswith +escape +escaperegexp +every +fill +filter +find +findindex +findkey +findlast +findlastindex +findlastkey +findwhere +first +flatten +flattendeep +floor +flow +flowright +foreach +foreachright +forin +forinright +forown +forownright +functions +get +_getnative +groupby +gt +gte +has +identity +includes +indexby +indexof +initial +inrange +intersection +invert +invoke +_invokepath +isarguments +isarray +isboolean +isdate +iselement +isempty +isequal +iserror +isfinite +isfunction +_isiterateecall +ismatch +isnan +isnative +isnull +isnumber +isobject +isplainobject +isregexp +isstring +istypedarray +isundefined +kebabcase +keys +keysin +last +lastindexof +lt +lte +map +mapkeys +mapvalues +matches +matchesproperty +max +memoize +merge +method +methodof +min +mixin +modargs +negate +noop +now +omit +once +pad +padleft +padright +pairs +parseint +partial +partialright +partition +pick +_pickbyarray +_pickbycallback +pluck +property +propertyof +pull +pullat +random +range +rearg +reduce +reduceright +_reescape +_reevaluate +_reinterpolate +reject +remove +repeat +_replaceholders +rest +restparam +result +round +sample +set +shuffle +size +slice +snakecase +some +sortby +sortbyall +sortbyorder +sortedindex +sortedlastindex +spread +startcase +startswith +sum +support diff --git a/lodash-node-package.json b/lodash-node-package.json new file mode 100644 index 0000000000000000000000000000000000000000..05963dbbbcc2c889dc3488f35b44acb9ee8dd150 --- /dev/null +++ b/lodash-node-package.json @@ -0,0 +1,20 @@ +{ + "name": "lodash-node", + "version": "3.10.1", + "description": "lodash module bundles for Node.js/io.js.", + "homepage": "https://lodash.com/", + "icon": "https://lodash.com/icon.svg", + "license": "MIT", + "main": "modern/index.js", + "author": "John-David Dalton (http://allyoucanleet.com/)", + "contributors": [ + "John-David Dalton (http://allyoucanleet.com/)", + "Benjamin Tan (https://d10.github.io/)", + "Blaine Bublitz (http://www.iceddev.com/)", + "Kit Cambridge (http://kitcambridge.be/)", + "Mathias Bynens (https://mathiasbynens.be/)" + ], + "bugs": "https://github.com/lodash/lodash/issues", + "repository": "lodash/lodash-node", + "scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" } +} diff --git a/lodash-package.json b/lodash-package.json new file mode 100644 index 0000000000000000000000000000000000000000..b9cb65b29ea523d1ac448a5a55f9a3865a3018d2 --- /dev/null +++ b/lodash-package.json @@ -0,0 +1,20 @@ +{ + "name": "lodash", + "version": "3.10.1", + "description": "The modern build of lodash modular utilities.", + "homepage": "https://lodash.com/", + "icon": "https://lodash.com/icon.svg", + "license": "MIT", + "main": "index.js", + "keywords": "modules, stdlib, util", + "author": "John-David Dalton (http://allyoucanleet.com/)", + "contributors": [ + "John-David Dalton (http://allyoucanleet.com/)", + "Benjamin Tan (https://d10.github.io/)", + "Blaine Bublitz (http://www.iceddev.com/)", + "Kit Cambridge (http://kitcambridge.be/)", + "Mathias Bynens (https://mathiasbynens.be/)" + ], + "repository": "lodash/lodash", + "scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" } +} diff --git a/lodash.spec b/lodash.spec new file mode 100644 index 0000000000000000000000000000000000000000..b21792b37d867f8f10fd927d972ad702bb717733 --- /dev/null +++ b/lodash.spec @@ -0,0 +1,211 @@ +%{?nodejs_find_provides_and_requires} +Name: lodash +Version: 3.10.1 +Release: 1 +Summary: A JavaScript utility library +License: MIT +URL: https://lodash.com/ +Source0: https://github.com/lodash/lodash/archive/%{version}/%{name}-%{version}.tar.gz +Source1: https://github.com/lodash/lodash-cli/archive/%{version}/%{name}-cli-%{version}.tar.gz +Source2: https://raw.githubusercontent.com/lodash/lodash/%{version}-npm/package.json#/%{name}-package.json +Source3: https://raw.githubusercontent.com/lodash/lodash-compat/%{version}-npm/package.json#/%{name}-compat-package.json +Source4: https://raw.githubusercontent.com/lodash/lodash-node/%{version}/package.json#/%{name}-node-package.json +Source5: %{name}-modules.txt +Source6: %{name}-modules-2.txt +BuildArch: noarch +BuildRequires: nodejs-packaging >= 7-5 web-assets-devel +BuildRequires: npm(closure-compiler) npm(glob) npm(uglify-js) >= 2.4.13 npm(semver) +Obsoletes: nodejs-lodash-arraypool < 2.4.1-5 +Obsoletes: nodejs-lodash-basebind < 2.4.1-5 +Obsoletes: nodejs-lodash-basecreatecallback < 2.4.1-5 +Obsoletes: nodejs-lodash-basecreatewrapper < 2.4.1-5 +Obsoletes: nodejs-lodash-basemerge < 2.4.1-5 +Obsoletes: nodejs-lodash-cachepush < 2.4.1-5 +Obsoletes: nodejs-lodash-charatcallback < 2.4.1-5 +Obsoletes: nodejs-lodash-compareascending < 2.4.1-5 +Obsoletes: nodejs-lodash-compose < 2.4.1-5 +Obsoletes: nodejs-lodash-contains < 2.4.1-5 +Obsoletes: nodejs-lodash-createcallback < 2.4.1-5 +Obsoletes: nodejs-lodash-escapehtmlchar < 2.4.1-5 +Obsoletes: nodejs-lodash-escapestringchar < 2.4.1-5 +Obsoletes: nodejs-lodash-getarray < 2.4.1-5 +Obsoletes: nodejs-lodash-getobject < 2.4.1-5 +Obsoletes: nodejs-lodash-htmlescapes < 2.4.1-5 +Obsoletes: nodejs-lodash-htmlunescapes < 2.4.1-5 +Obsoletes: nodejs-lodash-keyprefix < 2.4.1-5 +Obsoletes: nodejs-lodash-largearraysize < 2.4.1-5 +Obsoletes: nodejs-lodash-lodashwrapper < 2.4.1-5 +Obsoletes: nodejs-lodash-maxpoolsize < 2.4.1-5 +Obsoletes: nodejs-lodash-objectpool < 2.4.1-5 +Obsoletes: nodejs-lodash-objecttypes < 2.4.1-5 +Obsoletes: nodejs-lodash-reescapedhtml < 2.4.1-5 +Obsoletes: nodejs-lodash-releasearray < 2.4.1-5 +Obsoletes: nodejs-lodash-releaseobject < 2.4.1-5 +Obsoletes: nodejs-lodash-reunescapedhtml < 2.4.1-5 +Obsoletes: nodejs-lodash-setbinddata < 2.4.1-5 +Obsoletes: nodejs-lodash-shimisplainobject < 2.4.1-5 +Obsoletes: nodejs-lodash-shimkeys < 2.4.1-5 +Obsoletes: nodejs-lodash-unescapehtmlchar < 2.4.1-5 +%description +A JavaScript utility library delivering consistency, +modularity, performance, & extras. + +%package -n js-lodash +Summary: The modern build of lodash modular utilities +Requires: %{name} = %{version}-%{release} web-assets-filesystem +%description -n js-lodash +The modern build of lodash exported as a single file. + +%package -n nodejs-lodash +Summary: The modern build of lodash modular utilities +Requires: %{name} = %{version}-%{release} +%description -n nodejs-lodash +The modern build of lodash exported as Node.js/io.js modules. + +%package -n nodejs-lodash-compat +Summary: The compatibility build of lodash modular utilities +Requires: %{name} = %{version}-%{release} +%description -n nodejs-lodash-compat +The compatibility build of lodash exported as Node.js/io.js modules. + +%package -n nodejs-lodash-node +Summary: lodash module bundles for Node.js/io.js +Requires: %{name} = %{version}-%{release} +%description -n nodejs-lodash-node +The compatibility & modern builds of lodash exported as Node.js/io.js modules. + +%package -n nodejs-lodash-cli +Summary: The lodash command-line interface +Requires: %{name} = %{version}-%{release} +%description -n nodejs-lodash-cli +The lodash command-line interface for creating custom +builds & precompiling templates +%{lua: +template = [[ +%%package -n nodejs-lodash-@@PKG@@ +Summary: The modern build of lodash's _.@@FUNC@@ as a module +%%description -n nodejs-lodash-@@PKG@@ +The modern build of lodash's _.@@FUNC@@ as a module. +%%files -n nodejs-lodash-@@PKG@@ +%%doc npm/lodash.@@FUNC@@/README.md +%%license npm/lodash.@@FUNC@@/LICENSE +%{nodejs_sitelib}/lodash.@@FUNC@@ +]] +for func in io.open(rpm.expand("%SOURCE5")):lines() do + pkg = string.gsub(func, "_", "") + print(rpm.expand(string.gsub(string.gsub(template, "@@FUNC@@", func), "@@PKG@@", pkg)).."\n") +end} +%{lua: +template = [[ +%%package -n nodejs-lodash-@@PKG@@ +Summary: The modern build of lodash's _.@@FUNC@@ as a module +%%description -n nodejs-lodash-@@PKG@@ +The modern build of lodash's _.@@FUNC@@ as a module. +%%files -n nodejs-lodash-@@PKG@@ +%%doc npm/lodash.@@FUNC@@/README.md +%%license npm/lodash.@@FUNC@@/LICENSE +%{nodejs_sitelib}/lodash.@@FUNC@@ +]] +for func in io.open(rpm.expand("%SOURCE6")):lines() do + pkg = string.gsub(func, "_", "") + print(rpm.expand(string.gsub(string.gsub(template, "@@FUNC@@", func), "@@PKG@@", pkg)).."\n") +end} + +%prep +%setup -q -T -b 0 -a 1 +rm -rf lodash.js lodash.min.js node_modules vendor +pushd %{name}-cli-%{version} + %nodejs_fixdep closure-compiler "^0.2.6" + %nodejs_fixdep glob "^6.0.3" + %nodejs_fixdep -r lodash-compat + %nodejs_fixdep semver "^5.1.0" + %nodejs_fixdep uglify-js "^2.4.13" + rm -rf node_modules +popd +mkdir node_modules +mv %{name}-cli-%{version} node_modules/lodash-cli + +%build +pushd node_modules/lodash-cli + %nodejs_symlink_deps --build + ln -sf ../../.. node_modules/lodash-compat +popd +%{__nodejs} ./node_modules/lodash-cli/bin/lodash modern -o ./lodash.js +mkdir nodejs-lodash +pushd nodejs-lodash + %{__nodejs} ../node_modules/lodash-cli/bin/lodash modularize modern exports=node -o ./ + %{__nodejs} ../node_modules/lodash-cli/bin/lodash modern -d -o ./index.js +popd +mkdir nodejs-lodash-compat +pushd nodejs-lodash-compat + %{__nodejs} ../node_modules/lodash-cli/bin/lodash modularize compat exports=node -o ./ + %{__nodejs} ../node_modules/lodash-cli/bin/lodash compat -d -o ./index.js +popd +mkdir nodejs-lodash-node +pushd nodejs-lodash-node + %{__nodejs} ../node_modules/lodash-cli/bin/lodash modularize compat exports=node -o ./compat + %{__nodejs} ../node_modules/lodash-cli/bin/lodash compat exports=node -d -o ./compat/index.js + %{__nodejs} ../node_modules/lodash-cli/bin/lodash modularize modern exports=node -o ./modern + %{__nodejs} ../node_modules/lodash-cli/bin/lodash modern exports=node -d -o ./modern/index.js +popd +%{__nodejs} ./node_modules/lodash-cli/bin/lodash modularize modern exports=npm -d -o ./npm + +%install +mkdir -p %{buildroot}%{nodejs_sitelib} +mkdir -p %{buildroot}%{_jsdir}/lodash +cp -p lodash.js lodash.min.js %{buildroot}%{_jsdir}/lodash +cp -pr nodejs-lodash %{buildroot}%{nodejs_sitelib}/lodash +cp -pr %{SOURCE2} %{buildroot}%{nodejs_sitelib}/lodash/package.json +cp -pr nodejs-lodash-compat %{buildroot}%{nodejs_sitelib}/lodash-compat +cp -pr %{SOURCE3} %{buildroot}%{nodejs_sitelib}/lodash-compat/package.json +cp -pr nodejs-lodash-node %{buildroot}%{nodejs_sitelib}/lodash-node +cp -pr %{SOURCE4} %{buildroot}%{nodejs_sitelib}/lodash-node/package.json +mkdir -p %{buildroot}%{_datadir}/nodejs-lodash-cli +cp -pr node_modules/lodash-cli/template %{buildroot}%{_datadir}/nodejs-lodash-cli +mkdir -p %{buildroot}%{nodejs_sitelib}/lodash-cli +cp -pr node_modules/lodash-cli/package.json %{buildroot}%{nodejs_sitelib}/lodash-cli +mkdir -p %{buildroot}%{nodejs_sitelib}/lodash-cli/lib +install -p -m644 node_modules/lodash-cli/lib/* %{buildroot}%{nodejs_sitelib}/lodash-cli/lib +ln -s %{_datadir}/nodejs-lodash-cli/template %{buildroot}%{nodejs_sitelib}/lodash-cli +mkdir -p %{buildroot}%{nodejs_sitelib}/lodash-cli/bin +install -p -m755 node_modules/lodash-cli/bin/* %{buildroot}%{nodejs_sitelib}/lodash-cli/bin +mkdir -p %{buildroot}%{_bindir} +ln -s %{nodejs_sitelib}/lodash-cli/bin/lodash %{buildroot}%{_bindir} +pushd npm + for module in lodash.* + do + mkdir %{buildroot}%{nodejs_sitelib}/$module + cp -pr $module/package.json %{buildroot}%{nodejs_sitelib}/$module + cp -pr $module/index.js %{buildroot}%{nodejs_sitelib}/$module + done +popd +%nodejs_symlink_deps + +%check +%nodejs_symlink_deps --check + +%files +%{!?_licensedir:%global license %doc} +%doc README.md CONTRIBUTING.md +%license LICENSE + +%files -n js-lodash +%{_jsdir}/lodash + +%files -n nodejs-lodash +%{nodejs_sitelib}/lodash + +%files -n nodejs-lodash-compat +%{nodejs_sitelib}/lodash-compat + +%files -n nodejs-lodash-node +%{nodejs_sitelib}/lodash-node + +%files -n nodejs-lodash-cli +%{nodejs_sitelib}/lodash-cli +%{_datadir}/nodejs-lodash-cli +%{_bindir}/lodash + +%changelog +* Fri Aug 21 2020 Jeffery.Gao - 3.10.1-1 +- Package init diff --git a/lodash.yaml b/lodash.yaml new file mode 100644 index 0000000000000000000000000000000000000000..92444254f32e2cadfe7a5b12efc448adace89ad2 --- /dev/null +++ b/lodash.yaml @@ -0,0 +1,4 @@ +version_control: github +src_repo: lodash/lodash +tag_pattern: "(.*?)-npm-packages" +seperator: "."