-
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
16 changed files
with
83 additions
and
202 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,14 +1,16 @@ | ||
node_modules | ||
bower_components | ||
coverage | ||
npm-debug.log | ||
yarn.lock | ||
Gemfile.lock | ||
yarn-error.log | ||
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
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,2 +1 @@ | ||
sass_binary_site=https://npm.taobao.org/mirrors/node-sass/ | ||
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
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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: true }); | ||
|
||
//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 |
---|---|---|
@@ -0,0 +1,10 @@ | ||
type WeekType = 'en' | 'cn' | 'shorty' | 'emoji'; | ||
type WeekDay = 1 | 2 | 3 | 4 | 5 | 6 | 7; | ||
type WeekIndex = 0 | 1 | 2 | 3 | 4 | 5 | 6; | ||
|
||
interface NxStatic { | ||
Weeks: { | ||
at: (index: WeekIndex, type: WeekType) => string; | ||
day: (target: WeekDay | Date, type: WeekType) => string; | ||
} | ||
} |
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 |
---|---|---|
@@ -1,29 +1,29 @@ | ||
(function () { | ||
var global = typeof window !== 'undefined' ? window : this || Function('return this')(); | ||
var nx = global.nx || require('@jswork/next'); | ||
var NUMBER = 'number'; | ||
var DATABASE = { | ||
en: ['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday'], | ||
shorty: ['Mon', 'Tue', 'Wed', 'Thur', 'Fri', 'Sat', 'Sun'], | ||
emoji: ['π', 'πͺ', 'π', 'π€ͺ', 'π€£', 'π', 'π'], | ||
cn: ['δΈ', 'δΊ', 'δΈ', 'ε', 'δΊ', 'ε ', 'ζ₯'] | ||
}; | ||
import nx from '@jswork/next'; | ||
|
||
var NxWeeks = nx.declare('nx.Weeks', { | ||
statics: { | ||
at: function (inIndex, inType) { | ||
return DATABASE[inType][inIndex]; | ||
}, | ||
day: function (inDay, inType) { | ||
var day = typeof inDay === NUMBER ? inDay : inDay.getDay(); | ||
var idx = day - 1; | ||
idx = idx >= 0 ? idx : 6; | ||
return this.at(idx, inType); | ||
} | ||
} | ||
}); | ||
const NUMBER = 'number'; | ||
const DATABASE = { | ||
en: ['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday'], | ||
shorty: ['Mon', 'Tue', 'Wed', 'Thur', 'Fri', 'Sat', 'Sun'], | ||
emoji: ['π', 'πͺ', 'π', 'π€ͺ', 'π€£', 'π', 'π'], | ||
cn: ['δΈ', 'δΊ', 'δΈ', 'ε', 'δΊ', 'ε ', 'ζ₯'] | ||
}; | ||
|
||
if (typeof module !== 'undefined' && module.exports) { | ||
module.exports = NxWeeks; | ||
const NxWeeks = nx.declare('nx.Weeks', { | ||
statics: { | ||
at: function(inIndex, inType) { | ||
return DATABASE[inType][inIndex]; | ||
}, | ||
day: function(inDay, inType) { | ||
var day = typeof inDay === NUMBER ? inDay : inDay.getDay(); | ||
var idx = day - 1; | ||
idx = idx >= 0 ? idx : 6; | ||
return this.at(idx, inType); | ||
} | ||
} | ||
})(); | ||
}); | ||
|
||
if (typeof module !== 'undefined' && module.exports && typeof wx === 'undefined') { | ||
module.exports = NxWeeks; | ||
} | ||
|
||
export default NxWeeks; |