Skip to content

Commit 0b0564e

Browse files
committed
- tidy up project directory
1 parent f4134e5 commit 0b0564e

File tree

10 files changed

+4976
-494
lines changed

10 files changed

+4976
-494
lines changed

dist/index.html

Lines changed: 0 additions & 10 deletions
This file was deleted.

doesnotmeta/index.js

Lines changed: 0 additions & 4 deletions
This file was deleted.

index.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
module.exports = function(content, map, meta) {
2+
return `module.exports = ${JSON.stringify(eval(content))}`;
3+
}

package-lock.json

Lines changed: 4951 additions & 472 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,32 @@
11
{
2-
"name": "javascript-metaprogramming",
2+
"name": "meta-loader",
33
"version": "1.0.0",
44
"description": "",
55
"main": "index.js",
66
"scripts": {
7-
"build": "cross-env NODE_ENV=production webpack",
8-
"test": "echo \"Error: no test specified\" && exit 1"
7+
"test": "cross-env NODE_ENV=test jest"
98
},
109
"repository": {
1110
"type": "git",
12-
"url": "git+https://github.com/dirkarnez/javascript-metaprogramming.git"
11+
"url": "git+https://github.com/dirkarnez/meta-loader.git"
1312
},
1413
"author": "",
1514
"license": "ISC",
1615
"bugs": {
17-
"url": "https://github.com/dirkarnez/javascript-metaprogramming/issues"
16+
"url": "https://github.com/dirkarnez/meta-loader/issues"
1817
},
19-
"homepage": "https://github.com/dirkarnez/javascript-metaprogramming#readme",
18+
"homepage": "https://github.com/dirkarnez/meta-loader#readme",
2019
"devDependencies": {
2120
"cross-env": "^7.0.3",
21+
"jest": "^26.6.3",
2222
"webpack": "^5.19.0",
2323
"webpack-cli": "^4.4.0"
24-
}
24+
},
25+
"keywords": [
26+
"webpack",
27+
"css",
28+
"loader",
29+
"url",
30+
"import"
31+
]
2532
}

test/loader.test.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
describe("loader", () => {
2+
it("should work", () => {
3+
// cd test
4+
// npx cross-env NODE_ENV=production webpack
5+
// expect the generated source
6+
});
7+
});
File renamed without changes.
File renamed without changes.
File renamed without changes.

webpack.config.js renamed to test/webpack.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ module.exports = {
1010
test: /\.metajs$/i,
1111
use: [
1212
{
13-
loader: resolve(__dirname, "doesnotmeta") + "/index.js"
13+
loader: resolve(__dirname, "..") + "/index.js"
1414
},
1515
],
1616
exclude: /node_modules/,

0 commit comments

Comments
 (0)