-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #11 from obstudio/dev
Marklet v1.2
- Loading branch information
Showing
101 changed files
with
3,052 additions
and
1,507 deletions.
There are no files selected for viewing
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 |
---|---|---|
|
@@ -4,4 +4,6 @@ test.* | |
dist | ||
temp | ||
!test | ||
*.tgz | ||
*.tgz | ||
packages/app/main.js | ||
packages/app/index.html |
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,28 +1,22 @@ | ||
language: node_js | ||
|
||
node_js: | ||
- node | ||
|
||
- node | ||
env: | ||
global: | ||
- secure: ikFQOw+feac3+WhVb1QtCeAqp9OpQprD4oXmG4+q3MVAHFiP2pLcfZbrExr0bu472eEHLpRDjjlxHEGxcnJoSool4LUCkgTnlpN8/iGzug0gnv1/XoLZiwKVbonOQHaksJ8vGBIXFMPbXRYfc1DjSyWQhwxkdhrIGUEyPs0IqrBZ4nzbpCG/hsSbkKG6xMu5sXXwM/4Nmklx8kZRMWCQXB09gMysmt1TmPwxogyxXg1xm8GaSfA5GQHJZyW3oQpvGMKaXyDLymjLw66rlrUhZ9u0TKklkBqtVlhBnGm/eXxNFnDTfz+D8K3v2MSoSRuFb8bsofLHDFDm9suBuVV83nmINhkIcsmxEbS5B+Cv916za0NgCKxKJW/DRuCCoOdjRrXk36oC+7DCvEIVH8Hsraj7oC/WgBWSHCkI12UAXhxoSHrS3OiNxJEVZJXqIUzzzbyJJE5DTHElmBm1T6ZM7WEydzAPfhtzs/d5SsjwP0w6n+8SrnKifuBaFNw7wv40sdwey9TKJEXD84AeBsbTmJQCljJuKZntQryfoCVYB82OasEoEF0ryCnc0to1/lszXLAKJBv7gOTxzQ62tKo3wJo2L6FhGIOYG5n0NVXz7kC+5rKh5ZIwKx42oT9P4OAAwpM3p+LxzS7lkn6WLamFlioCFnzmvItO9yOFR/pIiKY= | ||
|
||
- secure: iQS7C6BZcBlFCfj4a/1scDVO6qOCMCb2lYfZSTVS1QRnMns3wNBaDARXKrjl2LLzVPqz5puhj7+z7grUZ/rAUIAsAQUJtHqpTcpHY6kksQsh5yqNYgfwACAx0VNPicLEv2f/ekjabxaA1+7FhbCR+DFa/ZUuXGC+RpVm/EWhDDEkmGVHvXoJN92dW5lfPy/kJwpus03Mr+tPVbDJwO83sWhulUTxRuf1bEAg2/fUiPf+qZzRy6swEnfS7GlQrpD0/KHYGoa0Dt3TmqJ1oP03CRvdo/g45VZutonjLNAu7oJ/lrSTNLU68JGOnv+WCGL9RwPgfBcjTldxmSer4fwYLh+oj1IJHexNA2G0dStYVwKfkj8jEd7DLJxOrOdTYXovl3tRpyGN7oCDoWepvH1nYPBvZno9Kgt32VW/xwhqZgia5tmzra0ouyxJ/GzOXph2NaHTe9jzuF2/i814q1r3VfC5Wm3kai5R2RoNtv6bk9vS4QyEwum5JhQRJpO9O8/z393fTxMN1ZOC7D307eUQLPiLSjb/MkEfEuWtqvuEieYKs7UelC9SzrM83urJUc94FFhGfLuhqriLTJSd8gdlm5iBPjz6WrhW8n6JCa0t7iI90Cxn4DIr7KB7SROW66KSC8HPi9srPcJKVb1dx/Z8PMSP4y6ZmkTMXpbryTFK9Vo= | ||
before_install: | ||
- node ./build/check.js | ||
|
||
- node ./build/check.js | ||
install: | ||
- npm i | ||
- npm run bootstrap | ||
|
||
- npm i | ||
- npm run bootstrap | ||
script: | ||
- npm run lint | ||
- npm run build:prod | ||
- npm run test | ||
|
||
- npm run lint | ||
- npm run build:prod | ||
- npm run test | ||
deploy: | ||
- skip_cleanup: true | ||
provider: script | ||
script: node ./build/release.js | ||
on: | ||
repo: obstudio/Marklet | ||
branch: master | ||
- skip_cleanup: true | ||
provider: script | ||
script: node ./build/release.js | ||
on: | ||
repo: obstudio/Marklet | ||
branch: master |
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 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,40 +1,39 @@ | ||
{ | ||
"scripts": { | ||
"start": "npm run build && node packages/cli -m edit", | ||
"publish": "lerna publish --no-git-tag-version", | ||
"bootstrap": "lerna bootstrap --hoist --no-ci", | ||
"build": "tsc -b && node build/build -sr", | ||
"build:prod": "tsc -b && node build/build -psr", | ||
"build:renderer": "node build/build -r", | ||
"build:server": "node build/build -s", | ||
"build:tsc": "tsc -b", | ||
"clear": "node build/clear", | ||
"test": "node packages/test/runner.js", | ||
"test": "node packages/test", | ||
"lint": "tslint packages/**/src/*.ts && eslint ." | ||
}, | ||
"devDependencies": { | ||
"@octokit/rest": "^15.12.0", | ||
"@octokit/rest": "^15.13.0", | ||
"@sfc2js/clean-css": "^1.1.1", | ||
"@sfc2js/sass": "^1.0.1", | ||
"@types/cheerio": "^0.22.9", | ||
"@types/js-yaml": "^3.11.2", | ||
"@types/node": "^10.10.1", | ||
"@types/node": "^10.11.4", | ||
"@types/ws": "^6.0.1", | ||
"ajv": "^6.5.3", | ||
"ajv": "^6.5.4", | ||
"chalk": "^2.4.1", | ||
"cheerio": "^1.0.0-rc.2", | ||
"commander": "^2.18.0", | ||
"eslint": "^5.6.0", | ||
"electron": "^3.0.2", | ||
"eslint": "^5.6.1", | ||
"eslint-plugin-vue": "^5.0.0-beta.3", | ||
"fast-deep-equal": "^2.0.1", | ||
"html-minifier": "^3.5.20", | ||
"lerna": "^3.4.0", | ||
"lerna": "^3.4.1", | ||
"node-sass": "^4.9.3", | ||
"prettier": "^1.14.3", | ||
"sass": "^1.14.1", | ||
"semver": "^5.5.1", | ||
"sfc2js": "^3.3.0", | ||
"sfc2js": "^3.3.2", | ||
"tslint": "^5.11.0", | ||
"typescript": "^3.0.3", | ||
"webpack": "^4.19.1" | ||
"typescript": "^3.1.1", | ||
"webpack": "^4.20.2" | ||
} | ||
} |
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,3 @@ | ||
# @marklet/app | ||
|
||
An electron app for marklet. |
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,68 @@ | ||
const util = require('../../../build/util') | ||
const sfc2js = require('sfc2js') | ||
const sass = require('sass') | ||
const path = require('path') | ||
const fs = require('fs') | ||
|
||
util.start() | ||
|
||
sfc2js.install({ | ||
name: 'sass-plugin', | ||
version: '1.0', | ||
target: 'style', | ||
lang: [ | ||
'sass', | ||
'scss', | ||
'css', | ||
], | ||
default: { | ||
includePaths: [], | ||
}, | ||
updated(options) { | ||
const dirPath = path.dirname(options.srcPath) | ||
this.options.includePaths.push(dirPath) | ||
}, | ||
render(style) { | ||
return sass.renderSync({ ...this.options, data: style.content }).css.toString() | ||
}, | ||
}) | ||
|
||
module.exports = sfc2js.transpile({ | ||
baseDir: util.resolve(), | ||
srcDir: 'app/comp', | ||
outDir: 'app/temp', | ||
enterance: util.isElectron() ? 'app.vue' : '', | ||
}) | ||
|
||
let indexCache = '' | ||
try { | ||
indexCache = fs.readFileSync(util.resolve('app/temp/index.cache.scss')).toString() | ||
} catch (error) { /**/ } | ||
|
||
const indexData = fs.readFileSync(util.resolve('app/comp/index.scss')).toString() | ||
|
||
if (indexData === indexCache && fs.existsSync(util.resolve('app/temp/index.css'))) { | ||
module.exports.css += fs.readFileSync(util.resolve('app/temp/index.css')).toString() | ||
} else { | ||
const indexCSS = sass.renderSync({ data: indexData }).css.toString() | ||
fs.writeFileSync(util.resolve('app/temp/index.css'), indexCSS) | ||
fs.writeFileSync(util.resolve('app/temp/index.cache.scss'), indexCache) | ||
module.exports.css += indexCSS | ||
} | ||
|
||
if (util.isElectron()) { | ||
const result = sfc2js.transpile({ | ||
baseDir: util.resolve(), | ||
srcDir: 'renderer/comp', | ||
outDir: 'renderer/temp', | ||
enterance: '../src', | ||
outCSSFile: '../dist/marklet.min.css', | ||
defaultScript: { | ||
props: ['node'], | ||
}, | ||
}) | ||
module.exports.css += result.css | ||
module.exports.plugin = result.app | ||
} | ||
|
||
console.log('Transpile Succeed.', util.finish()) |
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 @@ | ||
extends: | ||
- plugin:vue/essential | ||
|
||
globals: | ||
Vue: true |
Oops, something went wrong.