@@ -12,9 +11,9 @@
style="height: 400px;"
key-field="id"
>
-
{{ item.title }}[{{ index }}]
@@ -50,7 +49,7 @@ export default {
loadMoreItems(done) {
const that = this;
setTimeout(() => {
- const { items } = this;
+ const { items } = that;
items.push(...createItems(items.length, 5));
done();
}, 2000);
diff --git a/loaders/remove-docs-loader.js b/loaders/remove-docs-loader.js
index 17baf6b3..22371746 100644
--- a/loaders/remove-docs-loader.js
+++ b/loaders/remove-docs-loader.js
@@ -1,16 +1,16 @@
-'use strict';
+"use strict";
const contentWithoutBlock = (content, block) => {
const selfClosing = `<${block} />`;
const selfClosingIndex = content.indexOf(selfClosing);
- if(selfClosingIndex > -1) {
- return content.replace(selfClosing, '');
+ if (selfClosingIndex > -1) {
+ return content.replace(selfClosing, "");
}
- const startTag = '<' + block + '>';
- const endTag = '' + block + '>';
+ const startTag = "<" + block + ">";
+ const endTag = "" + block + ">";
const start = content.indexOf(startTag);
const end = content.indexOf(endTag);
- if(start < 0 || end < 0 || end <= start) {
+ if (start < 0 || end < 0 || end <= start) {
return content;
}
const beforeBlock = content.substring(0, start);
@@ -19,8 +19,16 @@ const contentWithoutBlock = (content, block) => {
return beforeBlock + afterBlock;
};
-module.exports = (content) => {
- const blocksToRemove = ['condensed', 'fullscreen-only', 'docs', 'title', 'tip'];
- const result = blocksToRemove.reduce((prev, curr) => contentWithoutBlock(prev, curr), content).trim();
- return 'export default ' + JSON.stringify(result);
+module.exports = content => {
+ const blocksToRemove = [
+ "condensed",
+ "fullscreen-only",
+ "docs",
+ "title",
+ "tip"
+ ];
+ const result = blocksToRemove
+ .reduce((prev, curr) => contentWithoutBlock(prev, curr), content)
+ .trim();
+ return "export default " + JSON.stringify(result);
};
diff --git a/package.json b/package.json
index feeaf5e6..f380ace1 100644
--- a/package.json
+++ b/package.json
@@ -17,13 +17,10 @@
"serve:no-api-generate": "vue-cli-service serve src/docs/index.js",
"generate-api": "node src/tools",
"test": "vue-cli-service test:unit",
- "lint": "vue-cli-service lint --no-fix --max-warnings 0 --max-errors 0 src",
- "bootstrap": "yarn install",
+ "lint": "vue-cli-service lint --no-fix --max-warnings 0 --max-errors 0 src demo loaders tests",
"build:docs": "cross-env NODE_OPTIONS=--max_old_space_size=8192 node src/tools/index && NODE_ENV=production; NODE_OPTIONS=--max_old_space_size=8192 vue-cli-service build src/docs/index.js",
- "build:docs:netlify": "yarn generate-api && cross-env NODE_ENV=production FDV_SPA=true webpack --progress --hide-modules --NETLIFY",
- "build:ui:dev": "vue-cli-service build --target lib --report --name FundamentalVue src/index.js --mode development",
- "deploy:docs": "yarn build:docs && gh-pages -d dist",
- "lint:dev": "vue-cli-service lint",
+ "build:docs:netlify": "yarn generate-api && cross-env NODE_ENV=production yarn build:docs --NETLIFY",
+ "deploy:docs": "yarn build:docs && gh-pages -d dist",
"lint:pre-commit": "printf \"running pre-commit lint...\" && yarn lint && printf \"done!\n\"",
"release": "./scripts/publish-release.sh",
"release:create": "create-release",
@@ -50,7 +47,6 @@
"popper.js": "^1.15.0"
},
"devDependencies": {
- "prismjs": "^1.16.0",
"@babel/cli": "^7.4.4",
"@types/jest": "^24.0.13",
"@types/webpack": "^4.4.34",
@@ -71,6 +67,7 @@
"core-js": "^2.6.5",
"cross-env": "^5.2.0",
"eslint": "^5.16.0",
+ "eslint-plugin-cypress": "^2.6.0",
"eslint-plugin-prettier": "^3.1.0",
"eslint-plugin-vue": "^5.2.2",
"fundamental-styles": "^0.1.0",
@@ -84,6 +81,7 @@
"markdown-loader": "^5.0.0",
"pre-commit": "^1.2.2",
"prerender-spa-plugin": "^3.4.0",
+ "prismjs": "^1.16.0",
"rimraf": "^2.6.3",
"rollup": "^1.12.5",
"rollup-plugin-commonjs": "^10.0.0",
diff --git a/src/docs/router/create.js b/src/docs/router/create.js
index 3ab1d8a4..45f8e304 100644
--- a/src/docs/router/create.js
+++ b/src/docs/router/create.js
@@ -22,7 +22,7 @@ const createRouter = componentApiRepository => {
component: () => import("./../components/d-component-api.vue")
}));
return new Router({
- mode: process.env.NODE_ENV === "production" ? "history" : "hash",
+ mode: "hash",
// Scroll the main component to the top.
scrollBehavior(to) {
const { meta = {} } = to;
diff --git a/tests/e2e/.eslintrc.js b/tests/e2e/.eslintrc.js
index 51155688..053c39f0 100644
--- a/tests/e2e/.eslintrc.js
+++ b/tests/e2e/.eslintrc.js
@@ -1,7 +1,5 @@
module.exports = {
- plugins: [
- "cypress"
- ],
+ plugins: ["cypress"],
env: {
mocha: true,
"cypress/globals": true
diff --git a/tests/e2e/specs/menu-selection.js b/tests/e2e/specs/menu-selection.js
index 704325d1..ac6e8017 100644
--- a/tests/e2e/specs/menu-selection.js
+++ b/tests/e2e/specs/menu-selection.js
@@ -23,7 +23,9 @@ describe("combobox", () => {
cy.get("@selected").should("have.text", "a-id-1");
cy.get("@highlighted").should("have.text", "a-id-1");
- cy.get("@item-a1").find("a").should("have.class", "is-selected");
+ cy.get("@item-a1")
+ .find("a")
+ .should("have.class", "is-selected");
});
it("can be highlighted from the outside", () => {
diff --git a/tests/e2e/specs/virtualized-list.js b/tests/e2e/specs/virtualized-list.js
index 950423e6..7fec35e0 100644
--- a/tests/e2e/specs/virtualized-list.js
+++ b/tests/e2e/specs/virtualized-list.js
@@ -7,9 +7,9 @@ describe("VirtualizedList", () => {
visitPage("virtualized-list");
});
- it("works", () => {
- cy.get("[data-cy-loading-indicator]").should("not.exist");
- cy.get("[data-cy-list]").scrollTo("bottom");
- cy.get("[data-cy-loading-indicator]").should("exist");
- });
-});
\ No newline at end of file
+ it("works", () => {
+ cy.get("[data-cy-loading-indicator]").should("not.exist");
+ cy.get("[data-cy-list]").scrollTo("bottom");
+ cy.get("[data-cy-loading-indicator]").should("exist");
+ });
+});
diff --git a/yarn.lock b/yarn.lock
index 59affe21..e313ee93 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -5039,6 +5039,13 @@ eslint-loader@^2.1.2:
object-hash "^1.1.4"
rimraf "^2.6.1"
+eslint-plugin-cypress@^2.6.0:
+ version "2.6.0"
+ resolved "https://registry.yarnpkg.com/eslint-plugin-cypress/-/eslint-plugin-cypress-2.6.0.tgz#c726dd1a312cd5234de94765ca79718a14edf0ef"
+ integrity sha512-/YmvhYFqjFLYw7llDl56U9KW+Z25TZJjDofT47aUnAFRRvOhj1y2nxJzZ1ZTnqBO1ja8gwRhtdT7LfTLg9ANJw==
+ dependencies:
+ globals "^11.12.0"
+
eslint-plugin-prettier@^3.0.0, eslint-plugin-prettier@^3.1.0:
version "3.1.0"
resolved "https://registry.yarnpkg.com/eslint-plugin-prettier/-/eslint-plugin-prettier-3.1.0.tgz#8695188f95daa93b0dc54b249347ca3b79c4686d"
@@ -6369,7 +6376,7 @@ global-prefix@^3.0.0:
kind-of "^6.0.2"
which "^1.3.1"
-globals@^11.0.1, globals@^11.1.0, globals@^11.7.0:
+globals@^11.0.1, globals@^11.1.0, globals@^11.12.0, globals@^11.7.0:
version "11.12.0"
resolved "https://registry.yarnpkg.com/globals/-/globals-11.12.0.tgz#ab8795338868a0babd8525758018c2a7eb95c42e"
integrity sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==