Skip to content

Commit 29e3a77

Browse files
committed
project setup
1 parent 809400a commit 29e3a77

File tree

6 files changed

+10
-25
lines changed

6 files changed

+10
-25
lines changed

dist/ts/app.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
"use strict";
2-
Object.defineProperty(exports, "__esModule", { value: true });
1+
'use strict';
2+
Object.defineProperty(exports, '__esModule', { value: true });
33
function hello() {
4-
return 'Hello World!';
4+
return 'Hello World!';
55
}
66
exports.hello = hello;
77
exports.default = hello;

index.html

-14
This file was deleted.

package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@
2424
"test:ts": "mocha -r ts-node/register --colors --recursive ./test/ts/**/*.spec.ts",
2525
"test": "npm run test:js && npm run test:ts",
2626
"coverage": "./node_modules/.bin/istanbul cover ./node_modules/.bin/_mocha -R spec --recursive ./test/js -- --compilers js:babel-core/register",
27-
"go": "npm run clean && npm run test && npm run build"
27+
"go": "npm run clean && npm run test && npm run build",
28+
"serve": "http-serve html"
2829
},
2930
"devDependencies": {
3031
"@types/chai": "^4.0.4",

test/js/app.spec.js

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
1-
import hello from './../../lib/js/app';
21
import { expect } from 'chai';
3-
// if you used the '@types/mocha' method to install mocha type definitions, uncomment the following line
4-
// import 'mocha';
2+
import hello from './../../lib/js/app';
53

64
describe('Hello function', () => {
75
it('should return hello world', () => {
86
const result = hello();
7+
98
expect(result).to.equal('Hello World!');
109
});
1110
});

test/ts/app.spec.ts

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1-
import hello from './../../lib/ts/app';
2-
import { expect } from 'chai';
3-
// if you used the '@types/mocha' method to install mocha type definitions, uncomment the following line
41
import 'mocha';
2+
import { expect } from 'chai';
3+
import hello from './../../lib/ts/app';
54

65
describe('Hello function', () => {
76
it('should return hello world', () => {

tsconfig.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"compilerOptions": {
33
/* Basic Options */
4-
"target": "es5", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', or 'ESNEXT'. */
4+
"target": "es6", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', or 'ESNEXT'. */
55
"module": "commonjs", /* Specify module code generation: 'none', commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */
66
"outDir": "./dist/ts",
77
// "lib": [], /* Specify library files to be included in the compilation: */

0 commit comments

Comments
 (0)