Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Pull assest into webpack and add card demos #7

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions knapsack/data/demos/demo.A9D1jtU7DH.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"id": "A9D1jtU7DH",
"type": "template",
"templateInfo": {
"path": "../../src/components/card/examples/demo/simpleCard.vue"
},
"title": "Card Full Demo"
}
10 changes: 10 additions & 0 deletions knapsack/data/demos/demo.QI_7r-lMZ1.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"id": "QI_7r-lMZ1",
"type": "template",
"templateInfo": {
"path": "../../src/components/card/examples/demo/complexCard.vue"
},
"title": "Complex Card",
"height": 586,
"width": 652
}
11 changes: 5 additions & 6 deletions knapsack/data/knapsack.asset-sets.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
{
"globalAssetSetIds": ["example"],
"globalAssetSetIds": ["cedar"],
"allAssetSets": {
"example": {
"id": "example",
"title": "Example",
"cedar": {
"id": "cedar",
"title": "Cedar",
"inlineCss": "",
"inlineJs": "",
"assets": [
{
"src": "../../dist/cedar-compiled.css"
"src": "../../dist/style.css"
}

]
}
}
Expand Down
19 changes: 17 additions & 2 deletions knapsack/data/knapsack.pattern.card.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,24 @@
"path": "../../dist/src/components/card/CdrCard.vue.mjs",
"templateLanguageId": "vue",
"spec": {
"isInferred": "../../src/components/card/CdrCard.vue"
"slots": {
"default": {
"title": "default"
}
},
"props": {
"$schema": "http://json-schema.org/draft-07/schema",
"description": "Related, interactive containers linking to a single subject or destination",
"type": "object",
"required": [],
"properties": {
"tag": {
"type": "string"
}
}
}
},
"demoIds": ["aXX4u1NXJC"],
"demoIds": ["aXX4u1NXJC", "A9D1jtU7DH", "QI_7r-lMZ1"],
"blockIds": []
}
],
Expand Down
52 changes: 40 additions & 12 deletions knapsack/knapsack.config.js
Original file line number Diff line number Diff line change
@@ -1,19 +1,47 @@
const { KnapsackVueRenderer } = require('@knapsack/renderer-vue');
const { configureKnapsack } = require('@knapsack/app');
const { join } = require('path');
const { version } = require('../package.json');
const { KnapsackVueRenderer } = require("@knapsack/renderer-vue");
const { configureKnapsack } = require("@knapsack/app");
const { join } = require("path");
const { version } = require("../package.json");

module.exports = configureKnapsack({
data: join(__dirname, './data'),
dist: join(__dirname, './dist'),
public: join(__dirname, './public'),
data: join(__dirname, "./data"),
dist: join(__dirname, "./dist"),
public: join(__dirname, "./public"),
version,
templateRenderers: [new KnapsackVueRenderer({

})],
templateRenderers: [
new KnapsackVueRenderer({
webpackConfig: {
module: {
rules: [
{
test: /\.s[ac]ss$/i,
use: [
// Creates `style` nodes from JS strings
"style-loader",
// Translates CSS into CommonJS
"css-loader",
// Compiles Sass to CSS
"sass-loader",
],
},
],
},
resolve: {
alias: {
srcdir: join(__dirname, "../src"),
cssdir: join(__dirname, "../src/css"),
componentsdir: join(__dirname, "../src/components"),
mixinsdir: join(__dirname, "../src/mixins"),
"~": join(__dirname, "../node_modules"),
// "@": join(__dirname, "../"),
},
},
},
}),
],
plugins: [],
cloud: {
siteId: 'rei-cedar',
repoRoot: join(__dirname, '..'),
siteId: "rei-cedar",
repoRoot: join(__dirname, ".."),
},
});
Loading
Loading