Commits (3)
......@@ -2,6 +2,14 @@
node_modules
/dist
# yarn
.yarn/*
!.yarn/releases
!.yarn/plugins
!.yarn/sdks
!.yarn/versions
.pnp.*
# local env files
.env.local
.env.*.local
......
include:
- project: coscine/tools/gitlab-ci-templates
file:
- /docker-runner.yml
- /nodejs.yml
stages:
- test
- build
# there are more stages in the imported file but we only want to import some
# - test
- publish
- release
- pre_release
before_script:
- npm install
build-branch:
extends: .build-branch
build-npm-release:
extends: .build-npm-release
test:
stage: test
script:
- npm run build
- npm test
except:
refs:
- master
- tags
variables:
- $GITLAB_USER_ID == $GIT_BOT_USER_ID
publish-branch-prerelease:
extends: .publish-branch-prerelease
publish:
stage: publish
script:
- npm run build
- npm test
- npx semantic-release
only:
- master
except:
variables:
- $GITLAB_USER_ID == $GIT_BOT_USER_ID
publish-master-release:
extends: .publish-master-release
release:
stage: release
script:
- npm run build
artifacts:
paths:
- dist
only:
- tags
publish-gitlab:
extends: .publish-gitlab-release
pre_release:
stage: pre_release
script:
- npm run build
artifacts:
paths:
- dist
when: manual
except:
- tags
- master
publish-npm:
extends: .publish-npm-release
packageExtensions:
"@vue/cli-service@*":
peerDependencies:
"@vue/cli-plugin-babel": "*"
"@vue/cli-plugin-eslint": "*"
"@vue/cli-plugin-typescript": "*"
"@vue/cli-plugin-typescript@*":
peerDependencies:
"babel-loader": "*"
"fork-ts-checker-webpack-plugin@*":
dependencies:
"vue-template-compiler": "*"
peerDependencies:
"typescript": "*"
"vue-i18n@*":
dependencies:
"vue": "^2.6.12"
"vue-material-design-icons@*":
dependencies:
"vue": "^2.6.12"
"vue-router@*":
dependencies:
"vue": "^2.6.12"
"vuex@*":
dependencies:
"vue": "^2.6.12"
"bootstrap-vue@*":
dependencies:
"vue": "^2.6.12"
"jquery": "*"
import { Config } from 'bili';
const config: Config = {
banner: true,
plugins: {
vue: {
css: true,
},
typescript2: {
// Override the config in `tsconfig.json`
tsconfigOverride: {
include: ['src'],
},
},
},
// Let's take this opportunity to move the CLI flags here as well
input: 'src/index.ts',
output: {
format: ['cjs', 'esm'],
extractCSS: true,
},
};
export default config;
This diff is collapsed.
{
"name": "@coscine/form-generator",
"version": "1.11.0",
"main": "./dist/index.js",
"module": "dist/index.esm.js",
"types": "dist/index.d.ts",
"version": "1.12.0",
"main": "dist/index.umd.js",
"module": "dist/index.common.js",
"browser": "dist/index.umd.min.js",
"style": "dist/index.css",
"directories": {
"doc": "docs"
},
"publishConfig": {
"access": "public",
"registry": "https://registry.npmjs.org/",
"tag": "latest"
},
"scripts": {
"dev": "vue serve FormGenerator.vue",
"build": "bili",
"build": "vue-cli-service build --target lib --name index ./src/index.ts",
"lint": "vue-cli-service lint",
"test:unit": "vue-cli-service test:unit",
"precommit": "lint-staged"
},
"lint-staged": {
"{src,test}/**/*.{ts,vue}": [
"prettier --write"
]
"test:unit": "vue-cli-service test:unit"
},
"files": [
"dist/*"
......@@ -32,8 +21,8 @@
"singleQuote": true
},
"dependencies": {
"@coscine/api-connection": "^1.23.1",
"@coscine/app-util": "^1.7.1",
"@coscine/api-connection": "^1.24.2",
"@coscine/app-util": "^1.8.1",
"@types/jquery": "^3.5.2",
"@types/node": "^14.14.12",
"@types/rdf-js": "^4.0.0",
......@@ -43,10 +32,11 @@
"rdf-parse": "^1.5.0",
"rdf-validate-shacl": "^0.2.5",
"vue": "^2.6.12",
"vue-i18n": "^8.22.0",
"vue-material-design-icons": "^4.9.0",
"vue-i18n": "^8.22.2",
"vue-material-design-icons": "^4.11.0",
"vue-multiselect": "^2.1.6",
"vuelidate": "^0.7.5"
"vue-runtime-helpers": "^1.1.2",
"vuelidate": "^0.7.6"
},
"devDependencies": {
"@hutson/semantic-delivery-gitlab": "^9.1.0",
......@@ -55,23 +45,15 @@
"@semantic-release/gitlab": "^6.0.5",
"@semantic-release/npm": "^7.0.6",
"@semantic-release/release-notes-generator": "^9.0.1",
"@types/chai": "^4.2.13",
"@types/mocha": "^8.0.3",
"@vue/cli-plugin-babel": "^4.5.7",
"@types/node": "^14.14.20",
"@typescript-eslint/eslint-plugin": "^4.12.0",
"@typescript-eslint/parser": "^4.12.0",
"@vue/cli-plugin-typescript": "^4.5.7",
"@vue/cli-plugin-unit-mocha": "^4.5.7",
"@vue/cli-service": "^4.5.7",
"@vue/test-utils": "1.1.0",
"bili": "^5.0.5",
"chai": "^4.2.0",
"lint-staged": "^10.4.0",
"prettier": "^2.1.2",
"rollup-plugin-typescript2": "^0.27.3",
"rollup-plugin-vue": "^5.1.9",
"semantic-release": "^17.3.0",
"tslint": "^6.1.3",
"tslint-config-prettier": "^1.18.0",
"tslint-config-standard": "^9.0.0",
"conventional-changelog-eslint": "3.0.9",
"core-js": "^3.8.2",
"eslint": "^7.17.0",
"semantic-release": "^17.3.1",
"typescript": "^4.0.3",
"vue-template-compiler": "^2.6.12"
},
......
module.exports = {
plugins: {
autoprefixer: {}
}
}
......@@ -195,7 +195,7 @@ export default LinkedDataHandler.extend({
setSHACLDefinition(unmappedSubjects: any) {
this.fixedValueIds = [];
this.sortedSHACLDefinition = [];
let keys = Object.keys(unmappedSubjects).sort((a, b) => parseInt(a) - parseInt(b));
let keys = Object.keys(unmappedSubjects).sort((a, b) => parseInt(a, 10) - parseInt(b, 10));
for (let i = 0; i < keys.length; i++) {
this.fixedValueIds.push(unmappedSubjects[keys[i]][0].subject.value);
this.sortedSHACLDefinition.push(unmappedSubjects[keys[i]]);
......
......@@ -45,7 +45,7 @@ export default Vue.extend({
) &&
parseInt(FieldReader.getObject(this.formFieldInformation, 'http://www.w3.org/ns/shacl#maxCount')[
'value'
]) === 1;
], 10) === 1;
this.class = FieldReader.getObject(this.formFieldInformation, 'http://www.w3.org/ns/shacl#class').value;
......@@ -111,7 +111,7 @@ export default Vue.extend({
'value'
] !== undefined
? parseInt(
maxCountObject['value']
maxCountObject['value'], 10
)
: this.maxNumberOfSelectedObjects;
}
......
......@@ -10,10 +10,13 @@
"allowSyntheticDefaultImports": true,
"sourceMap": true,
"baseUrl": ".",
"skipLibCheck": true,
"outDir": "dist",
"declaration": true,
"declarationDir": "dist",
"types": [
"webpack-env",
"mocha",
"chai"
"node"
],
"paths": {
"@/*": [
......
{
"extends": [
"tslint-config-standard",
"tslint-config-prettier"
]
}
\ No newline at end of file
This diff is collapsed.