Skip to content

Commit

Permalink
[npm publish] - npm publish 2017.9.6
Browse files Browse the repository at this point in the history
- update cli
  • Loading branch information
kaizhu256 committed Sep 5, 2017
1 parent 2859908 commit 6d50412
Show file tree
Hide file tree
Showing 4 changed files with 227 additions and 67 deletions.
117 changes: 80 additions & 37 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
# jslint-lite
this zero-dependency package will provide browser-compatible, classic-versions of jslint and csslint
this zero-dependency package will provide browser-compatible versions of jslint (v2014.7.8 and v2016.10.24) and csslint v0.10.0

[![travis-ci.org build-status](https://api.travis-ci.org/kaizhu256/node-jslint-lite.svg)](https://travis-ci.org/kaizhu256/node-jslint-lite) [![coverage](https://kaizhu256.github.io/node-utility2/build/coverage.badge.svg)](https://kaizhu256.github.io/node-utility2/build/coverage.html/index.html)
# live demo
- [https://kaizhu256.github.io/node-jslint-lite/build..beta..travis-ci.org/app](https://kaizhu256.github.io/node-jslint-lite/build..beta..travis-ci.org/app)

[![screenshot](https://kaizhu256.github.io/node-jslint-lite/build/screenshot.deployGithub.browser.%252Fnode-jslint-lite%252Fbuild%252Fapp.png)](https://kaizhu256.github.io/node-jslint-lite/build..beta..travis-ci.org/app)



[![travis-ci.org build-status](https://api.travis-ci.org/kaizhu256/node-jslint-lite.svg)](https://travis-ci.org/kaizhu256/node-jslint-lite) [![coverage](https://kaizhu256.github.io/node-jslint-lite/build/coverage.badge.svg)](https://kaizhu256.github.io/node-jslint-lite/build/coverage.html/index.html) [![snyk.io vulnerabilities](https://snyk.io/test/github/kaizhu256/node-jslint-lite/badge.svg)](https://snyk.io/test/github/kaizhu256/node-jslint-lite)

[![NPM](https://nodei.co/npm/jslint-lite.png?downloads=true)](https://www.npmjs.com/package/jslint-lite)

Expand All @@ -23,11 +30,10 @@ this zero-dependency package will provide browser-compatible, classic-versions o

# table of contents
1. [cdn download](#cdn-download)
1. [live demo](#live-demo)
1. [documentation](#documentation)
1. [quickstart standalone app](#quickstart-standalone-app)
1. [quickstart example.js](#quickstart-examplejs)
1. [all screenshots](#all-screenshots)
1. [extra screenshots](#extra-screenshots)
1. [package.json](#packagejson)
1. [changelog of last 50 commits](#changelog-of-last-50-commits)
1. [internal build script](#internal-build-script)
Expand All @@ -40,13 +46,6 @@ this zero-dependency package will provide browser-compatible, classic-versions o



# live demo
- [https://kaizhu256.github.io/node-jslint-lite/build..beta..travis-ci.org/app](https://kaizhu256.github.io/node-jslint-lite/build..beta..travis-ci.org/app)

[![github.com test-server](https://kaizhu256.github.io/node-jslint-lite/build/screenshot.deployGithub.browser.%252Fnode-jslint-lite%252Fbuild%252Fapp.png)](https://kaizhu256.github.io/node-jslint-lite/build..beta..travis-ci.org/app)



# documentation
#### apidoc
- [https://kaizhu256.github.io/node-jslint-lite/build..beta..travis-ci.org/apidoc.html](https://kaizhu256.github.io/node-jslint-lite/build..beta..travis-ci.org/apidoc.html)
Expand All @@ -56,12 +55,9 @@ this zero-dependency package will provide browser-compatible, classic-versions o
#### todo
- none

#### changelog for v2017.5.27
- npm publish 2017.5.27
- un-uglify embedded-lib jslint.js
- add README section 'all screenshots'
- add README section 'quickstart standalone app'
- auto-create README section 'table of contents'
#### changelog for v2017.9.6
- npm publish 2017.9.6
- update cli
- none

#### this package requires
Expand Down Expand Up @@ -106,13 +102,14 @@ node ./assets.app.js
/*
example.js
this script will create a web demo of jslint-lite
this script will run a web demo of jslint-lite
instruction
1. save this script as example.js
2. run the shell command:
$ npm install jslint-lite && PORT=8081 node example.js
3. open a browser to http://127.0.0.1:8081 and play with the web demo
4. edit this script to suit your needs
*/


Expand Down Expand Up @@ -194,15 +191,15 @@ instruction
switch (event && event.currentTarget && event.currentTarget.id) {
case 'testRunButton1':
// show tests
if (document.querySelector('#testReportDiv1').style.display === 'none') {
document.querySelector('#testReportDiv1').style.display = 'block';
if (document.querySelector('#testReportDiv1').style.maxHeight === '0px') {
local.uiAnimateSlideDown(document.querySelector('#testReportDiv1'));
document.querySelector('#testRunButton1').textContent =
'hide internal test';
local.modeTest = true;
local.testRunDefault(local);
// hide tests
} else {
document.querySelector('#testReportDiv1').style.display = 'none';
local.uiAnimateSlideUp(document.querySelector('#testReportDiv1'));
document.querySelector('#testRunButton1').textContent = 'run internal test';
}
break;
Expand Down Expand Up @@ -278,10 +275,12 @@ instruction
case 'node':
// init exports
module.exports = local;
// require modules
local.fs = require('fs');
local.http = require('http');
local.url = require('url');
// require builtins
Object.keys(process.binding('natives')).forEach(function (key) {
if (!local[key] && !(/\/|^_|^sys$/).test(key)) {
local[key] = require(key);
}
});
// init assets
local.assetsDict = local.assetsDict || {};
/* jslint-ignore-begin */
Expand All @@ -291,6 +290,7 @@ instruction
<head>\n\
<meta charset="UTF-8">\n\
<meta name="viewport" content="width=device-width, initial-scale=1">\n\
<!-- "assets.index.default.template.html" -->\n\
<title>{{env.npm_package_name}} (v{{env.npm_package_version}})</title>\n\
<style>\n\
/*csslint\n\
Expand All @@ -308,10 +308,27 @@ body {\n\
body > * {\n\
margin-bottom: 1rem;\n\
}\n\
body > button {\n\
width: 20rem;\n\
}\n\
button {\n\
cursor: pointer;\n\
}\n\
.uiAnimateSlide {\n\
overflow-y: hidden;\n\
transition: border-bottom 250ms, border-top 250ms, margin-bottom 250ms, margin-top 250ms, max-height 250ms, min-height 250ms, padding-bottom 250ms, padding-top 250ms;\n\
}\n\
.utility2FooterDiv {\n\
margin-top: 20px;\n\
text-align: center;\n\
}\n\
.zeroPixel {\n\
border: 0;\n\
height: 0;\n\
margin: 0;\n\
padding: 0;\n\
width: 0;\n\
}\n\
</style>\n\
<style>\n\
/*csslint\n\
Expand All @@ -333,7 +350,32 @@ textarea[readonly] {\n\
</head>\n\
<body>\n\
<!-- utility2-comment\n\
<div id="ajaxProgressDiv1" style="background: #d00; height: 2px; left: 0; margin: 0; padding: 0; position: fixed; top: 0; width: 25%;"></div>\n\
<div id="ajaxProgressDiv1" style="background: #d00; height: 2px; left: 0; margin: 0; padding: 0; position: fixed; top: 0; transition: background 500ms, width 1500ms; width: 0%;"></div>\n\
<script>\n\
/*jslint\n\
bitwise: true,\n\
browser: true,\n\
maxerr: 8,\n\
maxlen: 96,\n\
node: true,\n\
nomen: true,\n\
regexp: true,\n\
stupid: true\n\
*/\n\
(function () {\n\
"use strict";\n\
var ajaxProgressDiv1, ajaxProgressState;\n\
ajaxProgressDiv1 = document.querySelector("#ajaxProgressDiv1");\n\
ajaxProgressState = 0;\n\
window.timerIntervalAjaxProgressUpdate = setInterval(function () {\n\
ajaxProgressState += 1;\n\
ajaxProgressDiv1.style.width = Math.max(\n\
100 - 100 * Math.exp(-0.0625 * ajaxProgressState),\n\
Number(ajaxProgressDiv1.style.width.slice(0, -1)) || 0\n\
) + "%";\n\
}, 1000);\n\
}());\n\
</script>\n\
utility2-comment -->\n\
<h1>\n\
<!-- utility2-comment\n\
Expand All @@ -353,7 +395,7 @@ utility2-comment -->\n\
<!-- utility2-comment\n\
<h4><a download href="assets.app.js">download standalone app</a></h4>\n\
<button class="onclick onreset" id="testRunButton1">run internal test</button><br>\n\
<div id="testReportDiv1" style="display: none;"></div>\n\
<div class="uiAnimateSlide" id="testReportDiv1" style="border-bottom: 0; border-top: 0; margin-bottom: 0; margin-top: 0; max-height: 0; padding-bottom: 0; padding-top: 0;"></div>\n\
utility2-comment -->\n\
\n\
\n\
Expand Down Expand Up @@ -419,10 +461,11 @@ utility2-comment -->\n\
'assets.swgg.swagger.json',
'assets.swgg.swagger.server.json'
].forEach(function (file) {
local.assetsDict['/' + file] = local.assetsDict['/' + file] || '';
if (local.fs.existsSync(local.__dirname + '/' + file)) {
local.assetsDict['/' + file] = local.fs.readFileSync(
local.__dirname + '/' + file,
file = '/' + file;
local.assetsDict[file] = local.assetsDict[file] || '';
if (local.fs.existsSync(local.__dirname + file)) {
local.assetsDict[file] = local.fs.readFileSync(
local.__dirname + file,
'utf8'
);
}
Expand All @@ -446,8 +489,8 @@ utility2-comment -->\n\
return match0;
}
});
// run the cli
if (local.global.utility2_rollup || module !== require.main) {
// init cli
if (module !== require.main || local.global.utility2_rollup) {
break;
}
local.assetsDict['/assets.example.js'] =
Expand Down Expand Up @@ -496,7 +539,7 @@ utility2-comment -->\n\



# all screenshots
# extra screenshots
1. [https://kaizhu256.github.io/node-jslint-lite/build/screenshot.buildCi.browser.%252Ftmp%252Fbuild%252Fapidoc.html.png](https://kaizhu256.github.io/node-jslint-lite/build/screenshot.buildCi.browser.%252Ftmp%252Fbuild%252Fapidoc.html.png)
[![screenshot](https://kaizhu256.github.io/node-jslint-lite/build/screenshot.buildCi.browser.%252Ftmp%252Fbuild%252Fapidoc.html.png)](https://kaizhu256.github.io/node-jslint-lite/build/screenshot.buildCi.browser.%252Ftmp%252Fbuild%252Fapidoc.html.png)

Expand Down Expand Up @@ -545,7 +588,7 @@ utility2-comment -->\n\
"bin": {
"jslint-lite": "lib.jslint.js"
},
"description": "this zero-dependency package will provide browser-compatible, classic-versions of jslint and csslint",
"description": "this zero-dependency package will provide browser-compatible versions of jslint (v2014.7.8 and v2016.10.24) and csslint v0.10.0",
"devDependencies": {
"electron-lite": "kaizhu256/node-electron-lite#alpha",
"utility2": "kaizhu256/node-utility2#alpha"
Expand Down Expand Up @@ -580,12 +623,12 @@ utility2-comment -->\n\
"scripts": {
"build-ci": "utility2 shReadmeTest build_ci.sh",
"env": "env",
"heroku-postbuild": "npm install \"kaizhu256/node-utility2#alpha\" && utility2 shDeployHeroku",
"heroku-postbuild": "npm uninstall utility2 2>/dev/null; npm install kaizhu256/node-utility2#alpha && utility2 shDeployHeroku",
"postinstall": "[ ! -f npm_scripts.sh ] || ./npm_scripts.sh postinstall",
"start": "PORT=${PORT:-8080} utility2 start test.js",
"test": "PORT=$(utility2 shServerPortRandom) utility2 test test.js"
},
"version": "2017.5.27"
"version": "2017.9.6"
}
```

Expand Down
Loading

0 comments on commit 6d50412

Please sign in to comment.