-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
18 changed files
with
69 additions
and
196 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,16 @@ | ||
node_modules | ||
bower_components | ||
coverage | ||
npm-debug.log | ||
yarn.lock | ||
package-lock.json | ||
.DS_Store | ||
.idea | ||
.vscode | ||
|
||
# vscode localhistory | ||
.history | ||
dist | ||
|
||
# package manager | ||
npm-debug.log | ||
yarn.lock | ||
package-lock.json | ||
pnpm-lock.yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"upgrade": true, | ||
"filter": "/^@jswork|@afeiship/", | ||
"registry": "https://registry.npmjs.org" | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1 @@ | ||
registry=https://registry.npm.taobao.org | ||
disturl=https://npm.taobao.org/dist | ||
sass_binary_site=https://npm.taobao.org/mirrors/node-sass/ | ||
phantomjs_cdnurl=https://npm.taobao.org/mirrors/phantomjs/ | ||
electron_mirror=https://npm.taobao.org/mirrors/electron/ | ||
chromedriver_cdnurl=https://npm.taobao.org/mirrors/chromedriver | ||
operadriver_cdnurl=https://npm.taobao.org/mirrors/operadriver | ||
selenium_cdnurl=https://npm.taobao.org/mirrors/selenium | ||
node_inspector_cdnurl=https://npm.taobao.org/mirrors/node-inspector | ||
fsevents_binary_host_mirror=http://npm.taobao.org/mirrors/fsevents/ | ||
package-lock=false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,7 +8,7 @@ | |
|
||
## installation | ||
```bash | ||
npm install -S @jswork/next-gpid | ||
yarn add @jswork/next-gpid | ||
``` | ||
|
||
## usage | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,9 @@ | ||
(function() { | ||
'use strict'; | ||
const gulp = require('gulp'); | ||
const { NxScripts, CleanRegistry } = require('@jswork/gulp-registry'); | ||
|
||
const gulp = require('gulp'); | ||
const fs = require('fs'); | ||
const task1 = new CleanRegistry(); | ||
const task2 = new NxScripts({ name: 'qs', classify: false }); | ||
|
||
//import | ||
fs.readdirSync('./build').map(function(file) { | ||
require('./build/' + file); | ||
}); | ||
[task1, task2].forEach(gulp.registry); | ||
|
||
gulp.task('default', gulp.series(['clean', 'scripts'])); | ||
})(); | ||
gulp.task('default', gulp.series(['clean', 'nx:scripts'])); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
interface NxStatic { | ||
gpid(inUrl: string): string; | ||
gpid: any; | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,54 +3,55 @@ | |
"version": "1.0.2", | ||
"description": "Get picture uid from url.", | ||
"homepage": "https://js.work", | ||
"files": [ | ||
"dist", | ||
"index.d.ts" | ||
], | ||
"author": { | ||
"name": "afei", | ||
"email": "[email protected]" | ||
}, | ||
"scripts": { | ||
"build": "gulp", | ||
"test": "jest", | ||
"start": "node ./express.js", | ||
"test": "bun test", | ||
"release": "release-it" | ||
}, | ||
"main": "dist/index.js", | ||
"module": "dist/index.esm.js", | ||
"license": "MIT", | ||
"devDependencies": { | ||
"@babel/core": "^7.13.14", | ||
"@babel/preset-env": "^7.13.12", | ||
"@jswork/gulp-pkg-header": "^1.0.4", | ||
"@jswork/next": "^1.0.9", | ||
"@babel/core": "^7.21.3", | ||
"@babel/preset-env": "^7.20.2", | ||
"@jswork/gulp-pkg-header": "^1.0.8", | ||
"@jswork/gulp-registry": "^1.0.45", | ||
"@jswork/next": "^1.2.2", | ||
"@types/jest": "^29.5.12", | ||
"del": "^6.0.0", | ||
"gulp": "^4.0.2", | ||
"gulp-babel": "^8.0.0", | ||
"gulp-debug": "^4.0.0", | ||
"gulp-header": "^2.0.9", | ||
"gulp-ignore": "^3.0.0", | ||
"gulp-load-plugins": "^2.0.6", | ||
"gulp-prettier": "^4.0.0", | ||
"gulp-rename": "^2.0.0", | ||
"gulp-size": "^3.0.0", | ||
"gulp-replace": "^1.1.4", | ||
"gulp-uglify": "^3.0.2", | ||
"jest": "^26.6.3", | ||
"prettier": "^2.2.1", | ||
"release-it": "^14.2.2", | ||
"uglify-js": "3.12.4", | ||
"husky": "^9.0.11", | ||
"lint-staged": "^15.2.2", | ||
"prettier": "^3.2.5", | ||
"uglify-save-license": "^0.4.1" | ||
}, | ||
"babel": { | ||
"presets": [ | ||
[ | ||
"@babel/preset-env" | ||
] | ||
] | ||
}, | ||
"publishConfig": { | ||
"access": "public", | ||
"registry": "https://registry.npmjs.org" | ||
}, | ||
"boilerplate": "boilerplate-next-package", | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/afeiship/boilerplate-next-package.git" | ||
}, | ||
"keywords": [ | ||
"next", | ||
"id", | ||
"image", | ||
"picture", | ||
"pid", | ||
"uid" | ||
] | ||
"lint-staged": { | ||
"src/**/*.{js,jsx}": [ | ||
"npm run pretty" | ||
] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,13 @@ | ||
(function () { | ||
var global = typeof window !== 'undefined' ? window : this || Function('return this')(); | ||
var nx = global.nx || require('@jswork/next'); | ||
import nx from '@jswork/next'; | ||
|
||
nx.gpid = function (inUrl) { | ||
var url = inUrl || location.href || ''; | ||
var filename = url.substring(url.lastIndexOf('/') + 1); | ||
return filename.split('.')[0]; | ||
}; | ||
nx.gpid = function (inUrl) { | ||
var url = inUrl || location.href || ''; | ||
var filename = url.substring(url.lastIndexOf('/') + 1); | ||
return filename.split('.')[0]; | ||
}; | ||
|
||
if (typeof module !== 'undefined' && module.exports) { | ||
module.exports = nx.gpid; | ||
} | ||
})(); | ||
if (typeof module !== 'undefined' && module.exports && typeof wx === 'undefined') { | ||
module.exports = nx.gpid; | ||
} | ||
|
||
export default nx.gpid; |