Wrote test scripts

main
Jackson Morgan 9 months ago
parent 2a66bec94b
commit da76d7a93e
  1. 3
      packages/cli/.gitignore
  2. 9
      packages/cli/package.json
  3. 19
      packages/cli/test/.shapes/foafProfile.shex
  4. 4
      packages/cli/test/package.json
  5. 3
      packages/cli/test/placeholder.test.ts

@ -1 +1,2 @@
test/.ldo ./example-create
./example-init

@ -7,21 +7,16 @@
"ldo": "./dist/index.js" "ldo": "./dist/index.js"
}, },
"scripts": { "scripts": {
"start": "node dist/index.js build",
"start:init": "node dist/index.js init",
"dev": "npm run build && npm run start:init",
"build": "npm run clean && npm run build:ts && npm run copy-files", "build": "npm run clean && npm run build:ts && npm run copy-files",
"build:ts": "tsc --project tsconfig.build.json", "build:ts": "tsc --project tsconfig.build.json",
"clean": "rimraf dist/", "clean": "rimraf dist/",
"copy-files": "copyfiles -u 1 \"./src/**/*.ejs\" dist/", "copy-files": "copyfiles -u 1 \"./src/**/*.ejs\" dist/",
"update-permission": "chmod +x ./dist/index.js", "update-permission": "chmod +x ./dist/index.js",
"watch": "tsc --watch",
"test": "jest --coverage", "test": "jest --coverage",
"test:watch": "jest --watch",
"prepublishOnly": "npm run test && npm run build", "prepublishOnly": "npm run test && npm run build",
"lint": "eslint src/** --fix --no-error-on-unmatched-pattern", "lint": "eslint src/** --fix --no-error-on-unmatched-pattern",
"build:ldo": "./dist/index.js build --input test/.shapes --output test/.ldo", "test:init": "rm -rf ./example-init && mkdir ./example-init && cd ./example-init && ../dist/index.js init",
"generate-readme": "./dist/index.js generate-readme --project ./test --shapes ./test/.shapes/ --ldo ./test/.ldo/" "test:create": "rm -rf ./example-create && ./dist/index.js create ./example-create"
}, },
"repository": { "repository": {
"type": "git", "type": "git",

@ -1,19 +0,0 @@
# This shape is provided by default as an example
# You can create your own shape to fit your needs using ShEx (https://shex.io)
# Also check out https://shaperepo.com for examples of more shapes.
PREFIX ex: <https://example.com/>
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
ex:FoafProfile EXTRA a {
a [ foaf:Person ]
// rdfs:comment "Defines the node as a Person (from foaf)" ;
foaf:name xsd:string ?
// rdfs:comment "Define a person's name." ;
foaf:img xsd:string ?
// rdfs:comment "Photo link but in string form" ;
foaf:knows @ex:FoafProfile *
// rdfs:comment "A list of WebIds for all the people this user knows." ;
}

@ -1,4 +0,0 @@
{
"name": "foaf-profile",
"description": "A profile using FOAF."
}

@ -1,3 +0,0 @@
it("placeholder", () => {
expect(true).toBe(true);
});
Loading…
Cancel
Save