forked from tools/josh
1
0
Fork 0

Set up testing framework

This commit is contained in:
Florine W. Dekker 2019-10-29 18:36:26 +01:00
parent f85ee1a305
commit 529f213846
Signed by: FWDekker
GPG Key ID: B1B567AF58D6EE0F
18 changed files with 22 additions and 9 deletions

View File

@ -7,13 +7,13 @@ module.exports = grunt => {
},
copy: {
images: {
files: [{expand: true, cwd: "src/", src: ["**/*.png", "**/*.ico"], dest: "build/"}]
files: [{expand: true, cwd: "src/main/", src: ["**/*.png", "**/*.ico"], dest: "build/"}]
},
html: {
files: [{expand: true, cwd: "src/", src: "**/*.html", dest: "build/"}]
files: [{expand: true, cwd: "src/main/", src: "**/*.html", dest: "build/"}]
},
css: {
files: [{expand: true, cwd: "src/", src: "**/*.css", dest: "build/"}]
files: [{expand: true, cwd: "src/main/", src: "**/*.css", dest: "build/"}]
}
},
cssmin: {
@ -72,6 +72,7 @@ module.exports = grunt => {
// Post
"clean:after"
]);
grunt.registerTask("dev", ["default"]);
grunt.registerTask("deploy", [
// Pre
"clean:before",

View File

@ -14,10 +14,12 @@ $> npm install
```shell script
# Build the application in `build/` for development
$> grunt
```
```shell script
$> grunt dev
# Build the application in `build/` for deployment
$> grunt deploy
```
```shell script
# Run tests on the application in `build/`
$> npm test
```

BIN
package-lock.json generated

Binary file not shown.

View File

@ -4,6 +4,7 @@
"description": "The source code of [my personal website](https://fwdekker.com/).",
"dependencies": {},
"devDependencies": {
"ava": "2.4.0",
"grunt": "1.0.4",
"grunt-contrib-clean": "2.0.0",
"grunt-contrib-copy": "1.0.0",
@ -13,6 +14,9 @@
"grunt-ts": "6.0.0-beta.22",
"typescript": "3.6.4"
},
"scripts": {
"test": "ava"
},
"repository": {
"type": "git",
"url": "git@git.fwdekker.com:FWDekker/fwdekker.com.git"

View File

Before

Width:  |  Height:  |  Size: 100 KiB

After

Width:  |  Height:  |  Size: 100 KiB

View File

Before

Width:  |  Height:  |  Size: 6.9 KiB

After

Width:  |  Height:  |  Size: 6.9 KiB

6
src/test/PathTest.js Normal file
View File

@ -0,0 +1,6 @@
import test from "ava";
// import {Path} from "./../../build/js/fs.js";
test("paths", t => {
t.is("a", "a", "OH YES");
});

View File

@ -3,10 +3,10 @@
"module": "esnext",
"target": "es2019",
"strict": true,
"rootDir": "./src/js/",
"rootDir": "./src/main/js/",
"outDir": "./build/js/"
},
"include": [
"src/js/**/*.ts"
"src/main/js/**/*.ts"
]
}