mirror of
https://github.com/CommunitySolidServer/CommunitySolidServer.git
synced 2024-10-03 14:55:10 +00:00
chore: Build to dist folder.
Closes https://github.com/solid/community-server/issues/136
This commit is contained in:
parent
f3f0724f83
commit
9c933fd2d4
@ -1,12 +1,2 @@
|
|||||||
# don't ever lint node_modules
|
dist
|
||||||
node_modules
|
node_modules
|
||||||
# don't lint nyc coverage output
|
|
||||||
coverage
|
|
||||||
|
|
||||||
# ignore generated files
|
|
||||||
**/*.js
|
|
||||||
**/*.d.ts
|
|
||||||
**/*.js.map
|
|
||||||
|
|
||||||
# ignore temporary test files
|
|
||||||
test/tmp
|
|
||||||
|
@ -3,7 +3,7 @@ module.exports = {
|
|||||||
parser: '@typescript-eslint/parser',
|
parser: '@typescript-eslint/parser',
|
||||||
parserOptions: {
|
parserOptions: {
|
||||||
tsconfigRootDir: __dirname, // this is the reason this is a .js file
|
tsconfigRootDir: __dirname, // this is the reason this is a .js file
|
||||||
project: ['./tsconfig.json'],
|
project: ['./tsconfig.json', './test/tsconfig.json'],
|
||||||
},
|
},
|
||||||
globals: {
|
globals: {
|
||||||
AsyncIterable: 'readonly',
|
AsyncIterable: 'readonly',
|
||||||
|
13
.gitignore
vendored
13
.gitignore
vendored
@ -1,16 +1,7 @@
|
|||||||
.idea
|
|
||||||
|
|
||||||
node_modules
|
node_modules
|
||||||
|
|
||||||
*.js
|
dist
|
||||||
*.js.map
|
|
||||||
*.d.ts
|
|
||||||
components
|
|
||||||
|
|
||||||
tsconfig.tsbuildinfo
|
|
||||||
|
|
||||||
.eslintcache
|
.eslintcache
|
||||||
!.eslintrc.js
|
|
||||||
!test/eslintrc.js
|
|
||||||
|
|
||||||
coverage
|
coverage
|
||||||
|
tsconfig.tsbuildinfo
|
||||||
|
@ -16,6 +16,7 @@ module.exports = {
|
|||||||
"setupFilesAfterEnv": ["jest-rdf", "<rootDir>/test/util/SetupTests.ts"],
|
"setupFilesAfterEnv": ["jest-rdf", "<rootDir>/test/util/SetupTests.ts"],
|
||||||
"collectCoverage": true,
|
"collectCoverage": true,
|
||||||
"coveragePathIgnorePatterns": [
|
"coveragePathIgnorePatterns": [
|
||||||
|
"/dist/",
|
||||||
"/node_modules/",
|
"/node_modules/",
|
||||||
"/test/"
|
"/test/"
|
||||||
],
|
],
|
||||||
|
25
package.json
25
package.json
@ -18,16 +18,17 @@
|
|||||||
"node": ">=12.17 <15"
|
"node": ">=12.17 <15"
|
||||||
},
|
},
|
||||||
"lsd:module": "https://linkedsoftwaredependencies.org/bundles/npm/@solid/community-server",
|
"lsd:module": "https://linkedsoftwaredependencies.org/bundles/npm/@solid/community-server",
|
||||||
"lsd:components": "components/components.jsonld",
|
"lsd:components": "dist/components/components.jsonld",
|
||||||
"lsd:contexts": {
|
"lsd:contexts": {
|
||||||
"https://linkedsoftwaredependencies.org/bundles/npm/@solid/community-server/^1.0.0/components/context.jsonld": "components/context.jsonld"
|
"https://linkedsoftwaredependencies.org/bundles/npm/@solid/community-server/^1.0.0/components/context.jsonld": "dist/components/context.jsonld"
|
||||||
},
|
},
|
||||||
"lsd:importPaths": {
|
"lsd:importPaths": {
|
||||||
"https://linkedsoftwaredependencies.org/bundles/npm/@solid/community-server/^1.0.0/components/": "components/",
|
"https://linkedsoftwaredependencies.org/bundles/npm/@solid/community-server/^1.0.0/components/": "dist/components/",
|
||||||
"https://linkedsoftwaredependencies.org/bundles/npm/@solid/community-server/^1.0.0/config/": "config/"
|
"https://linkedsoftwaredependencies.org/bundles/npm/@solid/community-server/^1.0.0/config/": "config/",
|
||||||
|
"https://linkedsoftwaredependencies.org/bundles/npm/@solid/community-server/^1.0.0/dist/": "dist/"
|
||||||
},
|
},
|
||||||
"main": "./src/index.js",
|
"main": "./dist/index.js",
|
||||||
"types": "./src/index.d.ts",
|
"types": "./dist/index.d.ts",
|
||||||
"bin": {
|
"bin": {
|
||||||
"community-solid-server": "./bin/server.js"
|
"community-solid-server": "./bin/server.js"
|
||||||
},
|
},
|
||||||
@ -38,7 +39,7 @@
|
|||||||
"homepage": "https://github.com/solid/community-server#readme",
|
"homepage": "https://github.com/solid/community-server#readme",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "npm run build:ts && npm run build:components",
|
"build": "npm run build:ts && npm run build:components",
|
||||||
"build:components": "componentsjs-generator -s src -i .componentsignore",
|
"build:components": "componentsjs-generator -s src -c dist/components -i .componentsignore",
|
||||||
"build:ts": "tsc",
|
"build:ts": "tsc",
|
||||||
"docker": "npm run docker:setup && npm run docker:start",
|
"docker": "npm run docker:setup && npm run docker:start",
|
||||||
"docker:clean": "./test/docker/docker-clean.sh",
|
"docker:clean": "./test/docker/docker-clean.sh",
|
||||||
@ -55,7 +56,7 @@
|
|||||||
"test:unit": "jest test/unit",
|
"test:unit": "jest test/unit",
|
||||||
"validate": "componentsjs-compile-config urn:solid-server:default -c config/config-default.json -f > /dev/null",
|
"validate": "componentsjs-compile-config urn:solid-server:default -c config/config-default.json -f > /dev/null",
|
||||||
"version": "manual-git-changelog onversion",
|
"version": "manual-git-changelog onversion",
|
||||||
"watch": "nodemon --watch \"src/**/*.js\" --exec npm start"
|
"watch": "nodemon --watch \"dist/**/*.js\" --exec npm start"
|
||||||
},
|
},
|
||||||
"husky": {
|
"husky": {
|
||||||
"hooks": {
|
"hooks": {
|
||||||
@ -63,11 +64,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"files": [
|
"files": [
|
||||||
"bin/*.js",
|
"bin",
|
||||||
"src/**/*.js",
|
"dist",
|
||||||
"src/**/*.d.ts",
|
"config"
|
||||||
"components/**/*.jsonld",
|
|
||||||
"config/**/*.json"
|
|
||||||
],
|
],
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@rdfjs/data-model": "^1.2.0",
|
"@rdfjs/data-model": "^1.2.0",
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
import 'jest-rdf';
|
||||||
import * as url from 'url';
|
import * as url from 'url';
|
||||||
import { namedNode, quad } from '@rdfjs/data-model';
|
import { namedNode, quad } from '@rdfjs/data-model';
|
||||||
import { Parser } from 'n3';
|
import { Parser } from 'n3';
|
||||||
|
7
test/tsconfig.json
Normal file
7
test/tsconfig.json
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
{
|
||||||
|
"compilerOptions": {
|
||||||
|
"esModuleInterop": true,
|
||||||
|
"noUnusedLocals": true,
|
||||||
|
"strict": true
|
||||||
|
}
|
||||||
|
}
|
@ -1,3 +1,4 @@
|
|||||||
|
import 'jest-rdf';
|
||||||
import { namedNode, quad } from '@rdfjs/data-model';
|
import { namedNode, quad } from '@rdfjs/data-model';
|
||||||
import arrayifyStream from 'arrayify-stream';
|
import arrayifyStream from 'arrayify-stream';
|
||||||
import { Algebra } from 'sparqlalgebrajs';
|
import { Algebra } from 'sparqlalgebrajs';
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
import 'jest-rdf';
|
||||||
import { literal, namedNode, quad } from '@rdfjs/data-model';
|
import { literal, namedNode, quad } from '@rdfjs/data-model';
|
||||||
import type { Literal, NamedNode, Quad } from 'rdf-js';
|
import type { Literal, NamedNode, Quad } from 'rdf-js';
|
||||||
import { RepresentationMetadata } from '../../../../src/ldp/representation/RepresentationMetadata';
|
import { RepresentationMetadata } from '../../../../src/ldp/representation/RepresentationMetadata';
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
import 'jest-rdf';
|
||||||
import type { Readable } from 'stream';
|
import type { Readable } from 'stream';
|
||||||
import arrayifyStream from 'arrayify-stream';
|
import arrayifyStream from 'arrayify-stream';
|
||||||
import { DataFactory } from 'n3';
|
import { DataFactory } from 'n3';
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
import 'jest-rdf';
|
||||||
import type { Readable } from 'stream';
|
import type { Readable } from 'stream';
|
||||||
import { DataFactory } from 'n3';
|
import { DataFactory } from 'n3';
|
||||||
import type { Representation } from '../../../../src/ldp/representation/Representation';
|
import type { Representation } from '../../../../src/ldp/representation/Representation';
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
import 'jest-rdf';
|
||||||
import type { Readable } from 'stream';
|
import type { Readable } from 'stream';
|
||||||
import { RepresentationMetadata } from '../../../../src/ldp/representation/RepresentationMetadata';
|
import { RepresentationMetadata } from '../../../../src/ldp/representation/RepresentationMetadata';
|
||||||
import { InMemoryDataAccessor } from '../../../../src/storage/accessors/InMemoryDataAccessor';
|
import { InMemoryDataAccessor } from '../../../../src/storage/accessors/InMemoryDataAccessor';
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
import 'jest-rdf';
|
||||||
import { Readable } from 'stream';
|
import { Readable } from 'stream';
|
||||||
import arrayifyStream from 'arrayify-stream';
|
import arrayifyStream from 'arrayify-stream';
|
||||||
import { SparqlEndpointFetcher } from 'fetch-sparql-endpoint';
|
import { SparqlEndpointFetcher } from 'fetch-sparql-endpoint';
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
import 'jest-rdf';
|
||||||
import { Readable } from 'stream';
|
import { Readable } from 'stream';
|
||||||
import { namedNode, triple } from '@rdfjs/data-model';
|
import { namedNode, triple } from '@rdfjs/data-model';
|
||||||
import arrayifyStream from 'arrayify-stream';
|
import arrayifyStream from 'arrayify-stream';
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
import 'jest-rdf';
|
||||||
import { namedNode, quad } from '@rdfjs/data-model';
|
import { namedNode, quad } from '@rdfjs/data-model';
|
||||||
import arrayifyStream from 'arrayify-stream';
|
import arrayifyStream from 'arrayify-stream';
|
||||||
import type { Quad } from 'rdf-js';
|
import type { Quad } from 'rdf-js';
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
import 'jest-rdf';
|
||||||
import { DataFactory } from 'n3';
|
import { DataFactory } from 'n3';
|
||||||
import type { Quad } from 'rdf-js';
|
import type { Quad } from 'rdf-js';
|
||||||
import { pushQuad } from '../../../src/util/QuadUtil';
|
import { pushQuad } from '../../../src/util/QuadUtil';
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
import 'jest-rdf';
|
||||||
import { literal, namedNode } from '@rdfjs/data-model';
|
import { literal, namedNode } from '@rdfjs/data-model';
|
||||||
import { CONTENT_TYPE, XSD } from '../../../src/util/UriConstants';
|
import { CONTENT_TYPE, XSD } from '../../../src/util/UriConstants';
|
||||||
import { toNamedNode, toObjectTerm, toTypedLiteral, isTerm } from '../../../src/util/UriUtil';
|
import { toNamedNode, toObjectTerm, toTypedLiteral, isTerm } from '../../../src/util/UriUtil';
|
||||||
|
@ -1,4 +1,16 @@
|
|||||||
import { setGlobalLoggerFactory } from '../../src/logging/LogUtil';
|
import { setGlobalLoggerFactory } from '../../src/logging/LogUtil';
|
||||||
import { VoidLoggerFactory } from '../../src/logging/VoidLoggerFactory';
|
import { VoidLoggerFactory } from '../../src/logging/VoidLoggerFactory';
|
||||||
|
|
||||||
setGlobalLoggerFactory(new VoidLoggerFactory());
|
// Set the main logger
|
||||||
|
const loggerFactory = new VoidLoggerFactory();
|
||||||
|
setGlobalLoggerFactory(loggerFactory);
|
||||||
|
|
||||||
|
// Also set the logger factory of transpiled JS modules
|
||||||
|
// (which are instantiated by Components.js)
|
||||||
|
try {
|
||||||
|
// eslint-disable-next-line global-require, @typescript-eslint/no-var-requires, @typescript-eslint/no-require-imports
|
||||||
|
const dist = require('../../dist/logging/LogUtil');
|
||||||
|
dist.setGlobalLoggerFactory(loggerFactory);
|
||||||
|
} catch {
|
||||||
|
// Ignore
|
||||||
|
}
|
||||||
|
@ -9,16 +9,15 @@
|
|||||||
"inlineSources": true,
|
"inlineSources": true,
|
||||||
"noUnusedLocals": true,
|
"noUnusedLocals": true,
|
||||||
"preserveConstEnums": true,
|
"preserveConstEnums": true,
|
||||||
|
"outDir": "dist",
|
||||||
"sourceMap": true,
|
"sourceMap": true,
|
||||||
"strict": true,
|
"strict": true,
|
||||||
"stripInternal": true
|
"stripInternal": true
|
||||||
},
|
},
|
||||||
"include": [
|
"include": [
|
||||||
"src/**/*.ts",
|
"src"
|
||||||
"test/**/*.ts"
|
|
||||||
],
|
],
|
||||||
"exclude": [
|
"exclude": [
|
||||||
"node_modules",
|
"node_modules"
|
||||||
"test/tmp"
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user