From 2093cd11dcb0b5e538691c9d94779ce277825aaa Mon Sep 17 00:00:00 2001 From: wangxiao65 <287608437@qq.com> Date: Thu, 20 Aug 2020 19:47:50 +0800 Subject: [PATCH] package init --- hooker-0.2.3.tgz | Bin 0 -> 8673 bytes ....2.3-Rename-grunt.js-to-Gruntfile.js.patch | 145 ++++++++++++++++++ ...runtfile.js-for-use-with-grunt-0.4.0.patch | 99 ++++++++++++ ...ting-gruntfile-to-grunt-0.3.0-format.patch | 121 +++++++++++++++ nodejs-hooker.spec | 64 ++++++++ nodejs-hooker.yaml | 5 + 6 files changed, 434 insertions(+) create mode 100644 hooker-0.2.3.tgz create mode 100644 nodejs-hooker-0.2.3-Rename-grunt.js-to-Gruntfile.js.patch create mode 100644 nodejs-hooker-0.2.3-Update-Gruntfile.js-for-use-with-grunt-0.4.0.patch create mode 100644 nodejs-hooker-0.2.3-Updating-gruntfile-to-grunt-0.3.0-format.patch create mode 100644 nodejs-hooker.spec create mode 100644 nodejs-hooker.yaml diff --git a/hooker-0.2.3.tgz b/hooker-0.2.3.tgz new file mode 100644 index 0000000000000000000000000000000000000000..7fe3f1a9d1b174a40cf2c7a7e822c52c5849f8ab GIT binary patch literal 8673 zcmV<7As*fziwFP!000001MNL)SKCOk``N#u<2g6BGeX8TfwK^24-?3Q-2`%g?A$pF zC&*SC3uMWw2gI9jfBUVfeyAnOyaFU7);zGJ?&_-Q>guZM>ekrlpE}39*&lkoYoEk_ zyN7FWadCNRiQ(Us<>&Nwu`TZLRcmR5{jJqnftOHVW#w;+t#)e#-`@u^#Vd^yCjwNy z7LFi>>A#QUI&&g6c9J3MvWWjD^&(!c;eD;KR>60J*nBgH)$<^9c^Y_$`Bpu{GNQ8Q za|DJk2C*G+$927EZxZzDwS>n|&>lJC`XCMZi5CWSEFU-{-e8|A4B#ed6cBdyN$3T# zj>UAbwaSHRDh&o+;Kf7kLR+6N1d{zUig=K`3*FS`YZcWFi+SL_<8cgvUmuCTqRDX- z_Tk=+6E{o~`#kaz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patch b/nodejs-hooker-0.2.3-Rename-grunt.js-to-Gruntfile.js.patch new file mode 100644 index 0000000..4827d9e --- /dev/null +++ b/nodejs-hooker-0.2.3-Rename-grunt.js-to-Gruntfile.js.patch @@ -0,0 +1,145 @@ +From f90375aee319deb90fed80b47435b5e617e0d67b Mon Sep 17 00:00:00 2001 +From: Jamie Nguyen +Date: Wed, 10 Jul 2013 19:45:21 +0100 +Subject: [PATCH 1/2] Rename grunt.js to Gruntfile.js + +--- + Gruntfile.js | 59 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + grunt.js | 59 ----------------------------------------------------------- + 2 files changed, 59 insertions(+), 59 deletions(-) + create mode 100644 Gruntfile.js + delete mode 100644 grunt.js + +diff --git a/Gruntfile.js b/Gruntfile.js +new file mode 100644 +index 0000000..09bd528 +--- /dev/null ++++ b/Gruntfile.js +@@ -0,0 +1,59 @@ ++module.exports = function(grunt) { ++ ++ // Project configuration. ++ grunt.initConfig({ ++ pkg: '', ++ meta: { ++ name: 'JavaScript Hooker', ++ banner: '/*! <%= meta.name %> - v<%= pkg.version %> - <%= grunt.template.today("m/d/yyyy") %>\n' + ++ '* <%= pkg.homepage %>\n' + ++ '* Copyright (c) <%= grunt.template.today("yyyy") %> <%= pkg.author.name %>;' + ++ ' Licensed <%= _.pluck(pkg.licenses, "type").join(", ") %> */' ++ }, ++ concat: { ++ dist: { ++ src: ['', ''], ++ dest: 'dist/ba-hooker.js' ++ } ++ }, ++ min: { ++ dist: { ++ src: ['', 'dist/ba-hooker.js'], ++ dest: 'dist/ba-hooker.min.js' ++ } ++ }, ++ test: { ++ files: ['test/**/*.js'] ++ }, ++ lint: { ++ files: ['grunt.js', 'lib/**/*.js', 'test/**/*.js'] ++ }, ++ watch: { ++ files: '', ++ tasks: 'lint:files test:files' ++ }, ++ jshint: { ++ options: { ++ curly: true, ++ eqeqeq: true, ++ immed: true, ++ latedef: true, ++ newcap: true, ++ noarg: true, ++ sub: true, ++ undef: true, ++ boss: true, ++ eqnull: true ++ }, ++ globals: { ++ exports: true, ++ module: false ++ } ++ }, ++ uglify: {} ++ }); ++ ++ // Default task. ++ grunt.registerTask('default', 'lint test concat min'); ++ ++}; +diff --git a/grunt.js b/grunt.js +deleted file mode 100644 +index 09bd528..0000000 +--- a/grunt.js ++++ /dev/null +@@ -1,59 +0,0 @@ +-module.exports = function(grunt) { +- +- // Project configuration. +- grunt.initConfig({ +- pkg: '', +- meta: { +- name: 'JavaScript Hooker', +- banner: '/*! <%= meta.name %> - v<%= pkg.version %> - <%= grunt.template.today("m/d/yyyy") %>\n' + +- '* <%= pkg.homepage %>\n' + +- '* Copyright (c) <%= grunt.template.today("yyyy") %> <%= pkg.author.name %>;' + +- ' Licensed <%= _.pluck(pkg.licenses, "type").join(", ") %> */' +- }, +- concat: { +- dist: { +- src: ['', ''], +- dest: 'dist/ba-hooker.js' +- } +- }, +- min: { +- dist: { +- src: ['', 'dist/ba-hooker.js'], +- dest: 'dist/ba-hooker.min.js' +- } +- }, +- test: { +- files: ['test/**/*.js'] +- }, +- lint: { +- files: ['grunt.js', 'lib/**/*.js', 'test/**/*.js'] +- }, +- watch: { +- files: '', +- tasks: 'lint:files test:files' +- }, +- jshint: { +- options: { +- curly: true, +- eqeqeq: true, +- immed: true, +- latedef: true, +- newcap: true, +- noarg: true, +- sub: true, +- undef: true, +- boss: true, +- eqnull: true +- }, +- globals: { +- exports: true, +- module: false +- } +- }, +- uglify: {} +- }); +- +- // Default task. +- grunt.registerTask('default', 'lint test concat min'); +- +-}; +-- +1.8.3.1 + diff --git a/nodejs-hooker-0.2.3-Update-Gruntfile.js-for-use-with-grunt-0.4.0.patch b/nodejs-hooker-0.2.3-Update-Gruntfile.js-for-use-with-grunt-0.4.0.patch new file mode 100644 index 0000000..788481c --- /dev/null +++ b/nodejs-hooker-0.2.3-Update-Gruntfile.js-for-use-with-grunt-0.4.0.patch @@ -0,0 +1,99 @@ +From aa74d7f1c60705b80ab8897b408b24d55b087746 Mon Sep 17 00:00:00 2001 +From: Jamie Nguyen +Date: Wed, 10 Jul 2013 19:47:59 +0100 +Subject: [PATCH] Update Gruntfile.js for use with grunt 0.4.0 + +--- + Gruntfile.js | 38 +++++++++++++++++++++----------------- + package.json | 6 +++++- + 2 files changed, 26 insertions(+), 18 deletions(-) + +diff --git a/Gruntfile.js b/Gruntfile.js +index 09bd528..144d14e 100644 +--- a/Gruntfile.js ++++ b/Gruntfile.js +@@ -5,24 +5,23 @@ module.exports = function(grunt) { + pkg: '', + meta: { + name: 'JavaScript Hooker', +- banner: '/*! <%= meta.name %> - v<%= pkg.version %> - <%= grunt.template.today("m/d/yyyy") %>\n' + +- '* <%= pkg.homepage %>\n' + +- '* Copyright (c) <%= grunt.template.today("yyyy") %> <%= pkg.author.name %>;' + +- ' Licensed <%= _.pluck(pkg.licenses, "type").join(", ") %> */' + }, +- concat: { +- dist: { +- src: ['', ''], +- dest: 'dist/ba-hooker.js' +- } +- }, +- min: { ++ uglify: { ++ options: { ++ banner: '/*\n' + ++ ' * Javascript Hooker\n' + ++ ' * http://github.com/cowboy/javascript-hooker\n' + ++ ' * Copyright (c) 2012 "Cowboy" Ben Alman\n' + ++ ' * Licensed under the MIT license.\n' + ++ ' */\n' ++ }, + dist: { +- src: ['', 'dist/ba-hooker.js'], +- dest: 'dist/ba-hooker.min.js' ++ files: { ++ 'dist/ba-hooker.min.js': 'dist/ba-hooker.js' ++ } + } + }, +- test: { ++ nodeunit: { + files: ['test/**/*.js'] + }, + lint: { +@@ -30,7 +29,7 @@ module.exports = function(grunt) { + }, + watch: { + files: '', +- tasks: 'lint:files test:files' ++ tasks: 'lint:files nodeunit:files' + }, + jshint: { + options: { +@@ -50,10 +49,15 @@ module.exports = function(grunt) { + module: false + } + }, +- uglify: {} + }); + ++ grunt.loadNpmTasks('grunt-contrib-jshint'); ++ grunt.loadNpmTasks('grunt-contrib-nodeunit'); ++ grunt.loadNpmTasks('grunt-contrib-uglify'); ++ grunt.loadNpmTasks('grunt-contrib-watch'); ++ + // Default task. +- grunt.registerTask('default', 'lint test concat min'); ++ grunt.registerTask('default', ['lint nodeunit uglify']); ++ grunt.registerTask('test', ['lint nodeunit']); + + }; +diff --git a/package.json b/package.json +index 6dd6968..1bde458 100644 +--- a/package.json ++++ b/package.json +@@ -22,7 +22,11 @@ + ], + "dependencies": {}, + "devDependencies": { +- "grunt": "~0.2.1" ++ "grunt": "~0.2.1", ++ "grunt-contrib-jshint": "~0.6.0", ++ "grunt-contrib-nodeunit": "~0.2.0", ++ "grunt-contrib-uglify": "~0.2.2", ++ "grunt-contrib-watch": "~0.4.4" + }, + "keywords": [ + "patch", +-- +1.8.3.1 + diff --git a/nodejs-hooker-0.2.3-Updating-gruntfile-to-grunt-0.3.0-format.patch b/nodejs-hooker-0.2.3-Updating-gruntfile-to-grunt-0.3.0-format.patch new file mode 100644 index 0000000..14cf8ea --- /dev/null +++ b/nodejs-hooker-0.2.3-Updating-gruntfile-to-grunt-0.3.0-format.patch @@ -0,0 +1,121 @@ +From 96e3b30140ae2f4987af0f461acbc0a20b199f30 Mon Sep 17 00:00:00 2001 +From: Ben Alman +Date: Thu, 22 Mar 2012 21:13:32 -0400 +Subject: [PATCH] Updating gruntfile to grunt 0.3.0 format. + +--- + grunt.js | 102 +++++++++++++++++++++++++++++++++++---------------------------- + 1 file changed, 57 insertions(+), 45 deletions(-) + +diff --git a/grunt.js b/grunt.js +index c695148..09bd528 100644 +--- a/grunt.js ++++ b/grunt.js +@@ -1,47 +1,59 @@ +-/*global config:true, task:true*/ +-config.init({ +- pkg: '', +- meta: { +- name: 'JavaScript Hooker', +- banner: '/*! <%= meta.name %> - v<%= pkg.version %> - <%= template.today("m/d/yyyy") %>\n' + +- '* <%= pkg.homepage %>\n' + +- '* Copyright (c) <%= template.today("yyyy") %> <%= pkg.author.name %>;' + +- ' Licensed <%= _.pluck(pkg.licenses, "type").join(", ") %> */' +- }, +- concat: { +- 'dist/ba-hooker.js': ['', ''] +- }, +- min: { +- 'dist/ba-hooker.min.js': ['', 'dist/ba-hooker.js'] +- }, +- test: { +- files: ['test/**/*.js'] +- }, +- lint: { +- files: ['grunt.js', 'lib/**/*.js', 'test/**/*.js'] +- }, +- watch: { +- files: '', +- tasks: 'lint:files test:files' +- }, +- jshint: { +- options: { +- curly: true, +- eqeqeq: true, +- immed: true, +- latedef: true, +- newcap: true, +- noarg: true, +- sub: true, +- undef: true, +- eqnull: true ++module.exports = function(grunt) { ++ ++ // Project configuration. ++ grunt.initConfig({ ++ pkg: '', ++ meta: { ++ name: 'JavaScript Hooker', ++ banner: '/*! <%= meta.name %> - v<%= pkg.version %> - <%= grunt.template.today("m/d/yyyy") %>\n' + ++ '* <%= pkg.homepage %>\n' + ++ '* Copyright (c) <%= grunt.template.today("yyyy") %> <%= pkg.author.name %>;' + ++ ' Licensed <%= _.pluck(pkg.licenses, "type").join(", ") %> */' ++ }, ++ concat: { ++ dist: { ++ src: ['', ''], ++ dest: 'dist/ba-hooker.js' ++ } ++ }, ++ min: { ++ dist: { ++ src: ['', 'dist/ba-hooker.js'], ++ dest: 'dist/ba-hooker.min.js' ++ } ++ }, ++ test: { ++ files: ['test/**/*.js'] + }, +- globals: { +- exports: true +- } +- }, +- uglify: {} +-}); ++ lint: { ++ files: ['grunt.js', 'lib/**/*.js', 'test/**/*.js'] ++ }, ++ watch: { ++ files: '', ++ tasks: 'lint:files test:files' ++ }, ++ jshint: { ++ options: { ++ curly: true, ++ eqeqeq: true, ++ immed: true, ++ latedef: true, ++ newcap: true, ++ noarg: true, ++ sub: true, ++ undef: true, ++ boss: true, ++ eqnull: true ++ }, ++ globals: { ++ exports: true, ++ module: false ++ } ++ }, ++ uglify: {} ++ }); ++ ++ // Default task. ++ grunt.registerTask('default', 'lint test concat min'); + +-// Default task. +-task.registerTask('default', 'lint:files test:files concat min'); ++}; +-- +1.8.3.1 + diff --git a/nodejs-hooker.spec b/nodejs-hooker.spec new file mode 100644 index 0000000..c565c96 --- /dev/null +++ b/nodejs-hooker.spec @@ -0,0 +1,64 @@ +%{?nodejs_find_provides_and_requires} +%global enable_tests 0 +%global enable_grunt 0 +Name: nodejs-hooker +Version: 0.2.3 +Release: 1 +Summary: Monkey-patch (hook) functions for debugging +License: MIT +URL: https://github.com/cowboy/javascript-hooker +Source0: http://registry.npmjs.org/hooker/-/hooker-%{version}.tgz +Patch0: %{name}-0.2.3-Updating-gruntfile-to-grunt-0.3.0-format.patch +Patch1: %{name}-0.2.3-Rename-grunt.js-to-Gruntfile.js.patch +Patch2: %{name}-0.2.3-Update-Gruntfile.js-for-use-with-grunt-0.4.0.patch +BuildArch: noarch +ExclusiveArch: %{nodejs_arches} noarch +BuildRequires: nodejs-packaging uglify-js +%if 0%{?enable_tests} +BuildRequires: npm(nodeunit) +%endif +%if 0%{?enable_grunt} +BuildRequires: npm(grunt-cli) npm(grunt-contrib-nodeunit) npm(grunt-contrib-uglify) +%endif +%description +%{summary}. + +%prep +%setup -q -n package +%patch0 -p1 +%patch1 -p1 +%patch2 -p1 +%nodejs_symlink_deps --check + +%build +%if 0%{?enable_grunt} +grunt uglify +%else +head -n 8 lib/hooker.js > dist/ba-hooker.min.js.new +/usr/bin/uglifyjs dist/ba-hooker.js -m -c >> dist/ba-hooker.min.js.new +touch -r dist/ba-hooker.min.js dist/ba-hooker.min.js.new +mv dist/ba-hooker.min.js{.new,} +%endif + +%install +mkdir -p %{buildroot}%{nodejs_sitelib}/hooker +cp -pr package.json child.js dist/ lib/ parent.js \ + %{buildroot}%{nodejs_sitelib}/hooker +%nodejs_symlink_deps +%if 0%{?enable_tests} + +%check +%if 0%{?enable_grunt} +grunt nodeunit +%else +%{nodejs_sitelib}/nodeunit/bin/nodeunit test/*.js +%endif +%endif + +%files +%doc LICENSE-MIT README.md +%{nodejs_sitelib}/hooker + +%changelog +* Thu Aug 20 2020 wangxiao - 0.2.3-1 +- Package init diff --git a/nodejs-hooker.yaml b/nodejs-hooker.yaml new file mode 100644 index 0000000..d70649b --- /dev/null +++ b/nodejs-hooker.yaml @@ -0,0 +1,5 @@ +git_url: https://github.com/cowboy/javascript-hooker +version_control: github +src_repo: cowboy/javascript-hooker +tag_prefix: "^v" +seperator: "."