Skip to content

Commit

Permalink
Update NOde.js version
Browse files Browse the repository at this point in the history
  • Loading branch information
okunishinishi committed Nov 22, 2015
1 parent 45891e5 commit 49adf73
Show file tree
Hide file tree
Showing 17 changed files with 51 additions and 42 deletions.
2 changes: 1 addition & 1 deletion .LICENSE.bud
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

"use strict";

var apeTmpl = require('ape-tmpl'),
const apeTmpl = require('ape-tmpl'),
pkg = require('./package.json');

module.exports = apeTmpl.licenseBud({
Expand Down
2 changes: 1 addition & 1 deletion .README.md.bud
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

"use strict";

var apeTmpl = require('ape-tmpl'),
const apeTmpl = require('ape-tmpl'),
pkg = require('./package.json');

module.exports = apeTmpl.readmeMdBud({
Expand Down
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
language: node_js
node_js:
- '0.11'
- '4.0'
before_install:
- npm install istanbul nodeunit mocha -g
install:
Expand Down
4 changes: 2 additions & 2 deletions ci/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@

process.chdir(__dirname + '/..');

var apeTasking = require('ape-tasking'),
const apeTasking = require('ape-tasking'),
coz = require('coz');

apeTasking.runTasks('build', [
function renderBud(callback) {
(callback) => {
coz.render([
'.*.bud',
'lib/.*.bud',
Expand Down
4 changes: 2 additions & 2 deletions ci/cover.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@

process.chdir(__dirname + '/..');

var apeTasking = require('ape-tasking'),
const apeTasking = require('ape-tasking'),
apeCovering = require('ape-covering');

apeTasking.runTasks('cover', [
function measureCoverage(callback) {
(callback) => {
apeCovering.measureCoverage('ci/test.js', [], {
dir: 'coverage'
}, callback);
Expand Down
4 changes: 2 additions & 2 deletions ci/release.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@

process.chdir(__dirname + '/..');

var apeTasking = require('ape-tasking'),
const apeTasking = require('ape-tasking'),
apeReleasing = require('ape-releasing');

apeTasking.runTasks('release', [
function releasePackage(callback) {
(callback) => {
apeReleasing.releasePackage({
beforeRelease: [
'./ci/build.js',
Expand Down
4 changes: 2 additions & 2 deletions ci/report.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@

process.chdir(__dirname + '/..');

var apeTasking = require('ape-tasking'),
const apeTasking = require('ape-tasking'),
apeReporting = require('ape-reporting');

apeTasking.runTasks('report', [
function sendToCodeclimate(callback) {
(callback) => {
apeReporting.sendToCodeclimate('coverage/lcov.info', callback);
}
], true);
4 changes: 2 additions & 2 deletions ci/share.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@

process.chdir(__dirname + '/..');

var apeTasking = require('ape-tasking'),
const apeTasking = require('ape-tasking'),
sharegit = require('sharegit');

apeTasking.runTasks('share', [
function (callback) {
(callback) => {
sharegit(callback);
}
], true);
4 changes: 2 additions & 2 deletions ci/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@

process.chdir(__dirname + '/..');

var apeTasking = require('ape-tasking'),
const apeTasking = require('ape-tasking'),
apeTesting = require('ape-testing');

apeTasking.runTasks('test', [
function runNodeunit(callback) {
(callback) => {
apeTesting.runNodeunit('test/*_test.js', callback);
}
], true);
4 changes: 2 additions & 2 deletions ci/update.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@

process.chdir(__dirname + '/..');

var apeTasking = require('ape-tasking'),
const apeTasking = require('ape-tasking'),
apeUpdating = require('ape-updating');

apeTasking.runTasks('update', [
function renderBud(callback) {
(callback) => {
apeUpdating.updateDependencies({}, callback);
}
], true);
2 changes: 1 addition & 1 deletion doc/mocks/mock-jsx.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"use strict";

var React = require('react'),
const React = require('react'),
RectDOM = require('react-dom'),
html = require('apeman-react-html'),
ApSlider = require('../../lib/ap_slider'),
Expand Down
6 changes: 4 additions & 2 deletions example/example-jsx.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
var apeHighlighting = require('ape-highlighting'),
"use strict";

const apeHighlighting = require('ape-highlighting'),
fs = require('fs');

var highlighed = apeHighlighting.highlightJsx(
let highlighed = apeHighlighting.highlightJsx(
fs.readFileSync(require.resolve('../jsx/some-jsx.jsx'))
);

Expand Down
4 changes: 2 additions & 2 deletions lib/.index.js.bud
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@

"use strict";

var cozTmpl = require('coz-tmpl'),
const apeTmpl = require('ape-tmpl'),
pkg = require('../package.json');

module.exports = cozTmpl.indexJsBud({
module.exports = apeTmpl.indexJsBud({
desc:pkg.description,
module:pkg.name,
dirname:__dirname
Expand Down
10 changes: 5 additions & 5 deletions lib/highlight_jsx.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@

"use strict";

var argx = require('argx'),
const argx = require('argx'),
nsh = require('node-syntaxhighlighter'),
jsx = require('jsx-syntaxhighlighter'),
fs = require('fs');

/** @lends highlightJsx */
function highlightJsx(src, options) {
var args = argx(arguments);
var style = highlightJsx.style();
let args = argx(arguments);
let style = highlightJsx.style();
options = args.pop('object');
return [
'<div>',
Expand All @@ -27,12 +27,12 @@ function highlightJsx(src, options) {
}

highlightJsx.style = function () {
var filename = nsh.getStyles()[0].sourcePath;
let filename = nsh.getStyles()[0].sourcePath;
return fs.readFileSync(filename).toString();
};

highlightJsx.fromFile = function (filename, options) {
var src = fs.readFileSync(filename).toString();
let src = fs.readFileSync(filename).toString();
return highlightJsx(src, options);
}
module.exports = highlightJsx;
24 changes: 15 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@
"test": "./ci/test.js"
},
"repository": "ape-repo/ape-highlighting",
"keywords": [],
"keywords": [
"ape",
"highlighting"
],
"author": {
"name": "okunishinishi",
"email": "okunishitaka.com@gmail.com",
Expand All @@ -25,16 +28,19 @@
"node-syntaxhighlighter": "^0.8.1"
},
"devDependencies": {
"ape-covering": "^1.1.1",
"ape-releasing": "^1.0.17",
"ape-reporting": "^1.0.9",
"ape-tasking": "^1.0.8",
"ape-testing": "^1.5.0",
"ape-tmpl": "^1.3.16",
"ape-updating": "^1.1.1",
"ape-covering": "^2.0.0",
"ape-releasing": "^1.1.2",
"ape-reporting": "^2.0.3",
"ape-tasking": "^2.0.0",
"ape-testing": "^2.0.0",
"ape-tmpl": "^2.0.4",
"ape-updating": "^2.0.0",
"coz": "^3.1.6",
"coz-tmpl": "^1.1.0",
"injectmock": "^1.1.3",
"sharegit": "^1.0.0"
},
"engines": {
"node": ">4.0.0"
}
}
}
2 changes: 1 addition & 1 deletion test/.test.js.bud
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

"use strict";

var cozTmpl = require('coz-tmpl');
const cozTmpl = require('coz-tmpl');

module.exports = cozTmpl.nodeunitTestJsBud({
src: [
Expand Down
11 changes: 6 additions & 5 deletions test/highlight_jsx_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@
* Test case for highlightJsx.
* Runs with nodeunit.
*/
"use strict";

var fs = require('fs'),
const fs = require('fs'),
highlightJsx = require('../lib/highlight_jsx.js');

exports.setUp = function (done) {
Expand All @@ -15,8 +16,8 @@ exports.tearDown = function (done) {
};

exports['Highlight jsx'] = function (test) {
var src = require.resolve('../doc/mocks/mock-jsx.jsx');
var highlighted = highlightJsx(
let src = require.resolve('../doc/mocks/mock-jsx.jsx');
let highlighted = highlightJsx(
fs.readFileSync(src).toString()
);
test.ok(highlighted);
Expand All @@ -25,8 +26,8 @@ exports['Highlight jsx'] = function (test) {


exports['From file'] = function (test) {
var src = require.resolve('../doc/mocks/mock-jsx.jsx');
var highlighted = highlightJsx.fromFile(src);
let src = require.resolve('../doc/mocks/mock-jsx.jsx');
let highlighted = highlightJsx.fromFile(src);
test.ok(highlighted);
test.done();
};
Expand Down

0 comments on commit 49adf73

Please sign in to comment.