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
|
||||
# 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',
|
||||
parserOptions: {
|
||||
tsconfigRootDir: __dirname, // this is the reason this is a .js file
|
||||
project: ['./tsconfig.json'],
|
||||
project: ['./tsconfig.json', './test/tsconfig.json'],
|
||||
},
|
||||
globals: {
|
||||
AsyncIterable: 'readonly',
|
||||
|
13
.gitignore
vendored
13
.gitignore
vendored
@ -1,16 +1,7 @@
|
||||
.idea
|
||||
|
||||
node_modules
|
||||
|
||||
*.js
|
||||
*.js.map
|
||||
*.d.ts
|
||||
components
|
||||
|
||||
tsconfig.tsbuildinfo
|
||||
dist
|
||||
|
||||
.eslintcache
|
||||
!.eslintrc.js
|
||||
!test/eslintrc.js
|
||||
|
||||
coverage
|
||||
tsconfig.tsbuildinfo
|
||||
|
@ -16,6 +16,7 @@ module.exports = {
|
||||
"setupFilesAfterEnv": ["jest-rdf", "<rootDir>/test/util/SetupTests.ts"],
|
||||
"collectCoverage": true,
|
||||
"coveragePathIgnorePatterns": [
|
||||
"/dist/",
|
||||
"/node_modules/",
|
||||
"/test/"
|
||||
],
|
||||
|
25
package.json
25
package.json
@ -18,16 +18,17 @@
|
||||
"node": ">=12.17 <15"
|
||||
},
|
||||
"lsd:module": "https://linkedsoftwaredependencies.org/bundles/npm/@solid/community-server",
|
||||
"lsd:components": "components/components.jsonld",
|
||||
"lsd:components": "dist/components/components.jsonld",
|
||||
"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": {
|
||||
"https://linkedsoftwaredependencies.org/bundles/npm/@solid/community-server/^1.0.0/components/": "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/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/dist/": "dist/"
|
||||
},
|
||||
"main": "./src/index.js",
|
||||
"types": "./src/index.d.ts",
|
||||
"main": "./dist/index.js",
|
||||
"types": "./dist/index.d.ts",
|
||||
"bin": {
|
||||
"community-solid-server": "./bin/server.js"
|
||||
},
|
||||
@ -38,7 +39,7 @@
|
||||
"homepage": "https://github.com/solid/community-server#readme",
|
||||
"scripts": {
|
||||
"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",
|
||||
"docker": "npm run docker:setup && npm run docker:start",
|
||||
"docker:clean": "./test/docker/docker-clean.sh",
|
||||
@ -55,7 +56,7 @@
|
||||
"test:unit": "jest test/unit",
|
||||
"validate": "componentsjs-compile-config urn:solid-server:default -c config/config-default.json -f > /dev/null",
|
||||
"version": "manual-git-changelog onversion",
|
||||
"watch": "nodemon --watch \"src/**/*.js\" --exec npm start"
|
||||
"watch": "nodemon --watch \"dist/**/*.js\" --exec npm start"
|
||||
},
|
||||
"husky": {
|
||||
"hooks": {
|
||||
@ -63,11 +64,9 @@
|
||||
}
|
||||
},
|
||||
"files": [
|
||||
"bin/*.js",
|
||||
"src/**/*.js",
|
||||
"src/**/*.d.ts",
|
||||
"components/**/*.jsonld",
|
||||
"config/**/*.json"
|
||||
"bin",
|
||||
"dist",
|
||||
"config"
|
||||
],
|
||||
"dependencies": {
|
||||
"@rdfjs/data-model": "^1.2.0",
|
||||
|
@ -1,3 +1,4 @@
|
||||
import 'jest-rdf';
|
||||
import * as url from 'url';
|
||||
import { namedNode, quad } from '@rdfjs/data-model';
|
||||
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 arrayifyStream from 'arrayify-stream';
|
||||
import { Algebra } from 'sparqlalgebrajs';
|
||||
|
@ -1,3 +1,4 @@
|
||||
import 'jest-rdf';
|
||||
import { literal, namedNode, quad } from '@rdfjs/data-model';
|
||||
import type { Literal, NamedNode, Quad } from 'rdf-js';
|
||||
import { RepresentationMetadata } from '../../../../src/ldp/representation/RepresentationMetadata';
|
||||
|
@ -1,3 +1,4 @@
|
||||
import 'jest-rdf';
|
||||
import type { Readable } from 'stream';
|
||||
import arrayifyStream from 'arrayify-stream';
|
||||
import { DataFactory } from 'n3';
|
||||
|
@ -1,3 +1,4 @@
|
||||
import 'jest-rdf';
|
||||
import type { Readable } from 'stream';
|
||||
import { DataFactory } from 'n3';
|
||||
import type { Representation } from '../../../../src/ldp/representation/Representation';
|
||||
|
@ -1,3 +1,4 @@
|
||||
import 'jest-rdf';
|
||||
import type { Readable } from 'stream';
|
||||
import { RepresentationMetadata } from '../../../../src/ldp/representation/RepresentationMetadata';
|
||||
import { InMemoryDataAccessor } from '../../../../src/storage/accessors/InMemoryDataAccessor';
|
||||
|
@ -1,3 +1,4 @@
|
||||
import 'jest-rdf';
|
||||
import { Readable } from 'stream';
|
||||
import arrayifyStream from 'arrayify-stream';
|
||||
import { SparqlEndpointFetcher } from 'fetch-sparql-endpoint';
|
||||
|
@ -1,3 +1,4 @@
|
||||
import 'jest-rdf';
|
||||
import { Readable } from 'stream';
|
||||
import { namedNode, triple } from '@rdfjs/data-model';
|
||||
import arrayifyStream from 'arrayify-stream';
|
||||
|
@ -1,3 +1,4 @@
|
||||
import 'jest-rdf';
|
||||
import { namedNode, quad } from '@rdfjs/data-model';
|
||||
import arrayifyStream from 'arrayify-stream';
|
||||
import type { Quad } from 'rdf-js';
|
||||
|
@ -1,3 +1,4 @@
|
||||
import 'jest-rdf';
|
||||
import { DataFactory } from 'n3';
|
||||
import type { Quad } from 'rdf-js';
|
||||
import { pushQuad } from '../../../src/util/QuadUtil';
|
||||
|
@ -1,3 +1,4 @@
|
||||
import 'jest-rdf';
|
||||
import { literal, namedNode } from '@rdfjs/data-model';
|
||||
import { CONTENT_TYPE, XSD } from '../../../src/util/UriConstants';
|
||||
import { toNamedNode, toObjectTerm, toTypedLiteral, isTerm } from '../../../src/util/UriUtil';
|
||||
|
@ -1,4 +1,16 @@
|
||||
import { setGlobalLoggerFactory } from '../../src/logging/LogUtil';
|
||||
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,
|
||||
"noUnusedLocals": true,
|
||||
"preserveConstEnums": true,
|
||||
"outDir": "dist",
|
||||
"sourceMap": true,
|
||||
"strict": true,
|
||||
"stripInternal": true
|
||||
},
|
||||
"include": [
|
||||
"src/**/*.ts",
|
||||
"test/**/*.ts"
|
||||
"src"
|
||||
],
|
||||
"exclude": [
|
||||
"node_modules",
|
||||
"test/tmp"
|
||||
"node_modules"
|
||||
]
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user