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

Initializer for Vue sample #883

Merged
merged 133 commits into from
Dec 17, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
133 commits
Select commit Hold shift + click to select a range
08a1235
WIP: nextjs generator
Nov 15, 2021
0c22440
WIP: diy generator
Nov 16, 2021
1b063a6
WIP: nextjs generator - build templates
Nov 16, 2021
af1526c
Start of dedicated package 'create-sitecore-jss'
ambrauer Nov 16, 2021
95a9b8c
remove package-lock
ambrauer Nov 16, 2021
06143ae
Stubbed out build-templates.ts, added .gitignore
ambrauer Nov 16, 2021
9db0d7e
added build templates
addy-pathania Nov 17, 2021
d333ed8
WIP: nextjs initializer- ejs file render
Nov 17, 2021
f606310
Handling template command line parameter / prompt
ambrauer Nov 17, 2021
e046d58
Allow token replacement on file names
ambrauer Nov 17, 2021
d13a632
remove remaining disconnected files
ambrauer Nov 17, 2021
58a4e6e
Added check for empty directory
ambrauer Nov 17, 2021
d370675
Remove remaining styleguide code
ambrauer Nov 17, 2021
175bed0
test name change for lerna versioning
ambrauer Nov 17, 2021
0847304
updated yarn.lock
ambrauer Nov 17, 2021
451c35d
lerna test
ambrauer Nov 17, 2021
1036285
Revert "lerna test"
ambrauer Nov 17, 2021
3d18acf
get rid of mkdirp helper in favor of fs-extra
ambrauer Nov 17, 2021
4765263
Add support for 'add' positinal param
Nov 18, 2021
010a3b3
Initial watch script
ambrauer Nov 18, 2021
6ffd8cd
Fix templates, add prefix flag
Nov 18, 2021
ac78d03
added logs, detect initializer, feed args from json
addy-pathania Nov 19, 2021
c044535
refined the config file and added switch case to initializers
addy-pathania Nov 19, 2021
53b1dc1
merged with diy-generator-watch
addy-pathania Nov 19, 2021
9320377
Adding diffing to 'add'
Nov 19, 2021
066b79f
Fix merge conflict
Nov 19, 2021
ce6228d
Styleguide sub-initializer WIP: prompts for diffs working
Nov 22, 2021
d62357a
Update yes flag to override with passed in args
Nov 22, 2021
2a3eeef
WIP: Add dependencies/scripts to package.json during post-init
Nov 22, 2021
f592b84
Basic "next steps" introduced, some linting errors fixed
ambrauer Nov 22, 2021
029724e
WIP: Removing code duplication between files, start refactor package.…
Nov 22, 2021
d688043
Fix merge conflicts
Nov 22, 2021
082ceb3
WIP: package.json, lint
Nov 23, 2021
007a376
Add diff prompt to package.json, use diffJson method for .json files
Nov 23, 2021
64d0919
Add jss cli to base nextjs template and remove message about yarn
Nov 23, 2021
6be06ac
Add diff to package.json, add some missing template files
Nov 23, 2021
128a9d2
Move styleguide Navigation component to proper place in src, fix tsco…
Nov 23, 2021
d7972de
Remove unused stuff in cli package
Nov 24, 2021
804ea27
Diy generator yarn install (#861)
CobyPear Nov 24, 2021
b52ba85
Merge branch 'diy-generator' of github.com:Sitecore/jss into diy-gene…
Nov 24, 2021
a6a9696
Update error handling for transformFiles
Nov 24, 2021
d63f457
Start adding unit tests for shared functions
Nov 24, 2021
191cf82
Add test(s)
Nov 24, 2021
7b17dd1
Add error message when adding post-init to non-JSS app
Nov 29, 2021
709c748
Reorganize and refactor some base functionality
Nov 29, 2021
f3069e6
WIP: Unit tests for helpers
Nov 29, 2021
4e4992c
Add coverage script, add support for deep merge of package.json files
illiakovalenko Nov 30, 2021
c5271bc
Cover helpers by UT
illiakovalenko Nov 30, 2021
f47f486
Cover diffFiles by UT
illiakovalenko Nov 30, 2021
81c4bd2
Minor fixes
Nov 30, 2021
292ce78
Fix isJssApp UT
Nov 30, 2021
4497111
merged with dev
addy-pathania Nov 30, 2021
b7a544e
merge with dev and refactor
addy-pathania Nov 30, 2021
f9aac1e
adde yarn lock
addy-pathania Nov 30, 2021
94e62f6
Update diffFiles test, fix sinon wrap error
Nov 30, 2021
6c93952
Add litFix command, add missing ejs logic to connected demo tsx
Nov 30, 2021
0a028d5
group tests
illiakovalenko Dec 1, 2021
205e898
Cover transform by UT
illiakovalenko Dec 1, 2021
db02682
Cover cmd by UT
illiakovalenko Dec 1, 2021
9e0e23d
Restructure folders, delay install
Dec 1, 2021
3e64e79
Merge branch 'diy-generator' of github.com:Sitecore/jss into diy-gene…
addy-pathania Dec 2, 2021
a9e474b
Fixes before demo
Dec 2, 2021
cffc43d
Merge branch 'dev' into diy-generator
ambrauer Dec 3, 2021
0ad2efe
NextjsAnswer cleanup (remove redundant props, move/rename file to fol…
ambrauer Dec 3, 2021
9642ce6
apply sitemap-fetcher plugin for disconnected
ambrauer Dec 3, 2021
06131ff
apply next.config plugin changes
ambrauer Dec 3, 2021
18813cd
Remove unnecessary devDependencies (main packages include own type de…
ambrauer Dec 3, 2021
9bd1354
Rename transformPostInit to writeFiles, fix some tests
Dec 3, 2021
f98485e
remove monorepo dev dependencies if dev environment
ambrauer Dec 3, 2021
3c746f3
Merge branch 'diy-generator' of https://github.com/Sitecore/jss into …
ambrauer Dec 3, 2021
dc1d1d4
Fix scaffold script
Dec 3, 2021
a25edd4
added tests for writePackageJson helper
ambrauer Dec 3, 2021
000cf2d
Revert "Fix scaffold script"
Dec 3, 2021
7adb382
Merge branch 'diy-generator' of github.com:Sitecore/jss into diy-gene…
Dec 3, 2021
2749f51
Merge branch 'diy-generator' of github.com:Sitecore/jss into diy-gene…
addy-pathania Dec 6, 2021
636993b
scaffold-component updates for disconnected/styleguide
ambrauer Dec 6, 2021
907ad28
removed extra sitemapFetcher import
ambrauer Dec 6, 2021
f7f60b7
fix removeDevDependencies check, consolidation in [[...path]].tsx
ambrauer Dec 6, 2021
9a9f5f2
added _app.tsx (with bootstrap, nprogress) for nextjs-styleguide
ambrauer Dec 6, 2021
77720aa
"yes" handling for subsequent initializers (don't prompt for diffs wh…
ambrauer Dec 6, 2021
073f05d
only pass along __true__ "yes" answers
ambrauer Dec 6, 2021
677833d
Initializers internationalization (#868)
illiakovalenko Dec 7, 2021
4306bdb
[NextJS] Refactor scaffold script to make it pluggable (#870)
illiakovalenko Dec 8, 2021
5c24713
Merge branch 'diy-generator' of github.com:Sitecore/jss into diy-gene…
addy-pathania Dec 8, 2021
36fb787
[Initializers] Refactor prompts and answers (#872)
illiakovalenko Dec 8, 2021
fe8d8bd
Merge branch 'diy-generator' of github.com:Sitecore/jss into diy-gene…
addy-pathania Dec 8, 2021
c3aa4b2
Update some ejs closing tags to trim unwanted newline
Dec 8, 2021
39dad38
Refactor post-initializer flow (#874)
ambrauer Dec 8, 2021
81aa5f8
Fixed watch mode
ambrauer Dec 8, 2021
8d2e075
* #511292 fixed issue where transform wasn't occurring on package.jso…
ambrauer Dec 8, 2021
06a0c81
only run lint --fix if a lint script exists
ambrauer Dec 8, 2021
4b2995b
Merge branch 'diy-generator' of github.com:Sitecore/jss into diy-gene…
addy-pathania Dec 9, 2021
4c1480d
[Initializers] Split `force`, `yes` flags (#877)
illiakovalenko Dec 9, 2021
04fd0a2
Merge branch 'diy-generator' of github.com:Sitecore/jss into diy-gene…
addy-pathania Dec 9, 2021
63288cb
Add dynamic logic to init factory and base templates prompt choices
Dec 9, 2021
4b270d9
Add silent option to run
Dec 9, 2021
34ccd9f
Merge branch 'diy-generator' of github.com:Sitecore/jss into diy-gene…
addy-pathania Dec 10, 2021
dca92f0
added vue initializer
addy-pathania Dec 10, 2021
31a4a3c
skipped index.html file from ejs rendering
addy-pathania Dec 10, 2021
86e469e
Add getAppPrefix helper to ejs data
Dec 10, 2021
56e347e
remove 'yes' on initializer result (force now handling)
ambrauer Dec 10, 2021
90a8d66
updates from pr feedback (error handling, language, defaults)
ambrauer Dec 10, 2021
ca5a827
Resolve PR comments
Dec 10, 2021
0fa83b2
Merge branch 'diy-generator' of github.com:Sitecore/jss into diy-gene…
Dec 10, 2021
9bd4f92
bump hostname prompt before fetchWith (better flow when nextjs adds p…
ambrauer Dec 10, 2021
7e812b0
use template name for default folder name (if appName not provided)
ambrauer Dec 10, 2021
f3ac55d
Resolve more PR comments
Dec 10, 2021
f458ae5
Merge branch 'diy-generator' of github.com:Sitecore/jss into diy-gene…
Dec 10, 2021
6b7dc43
Add error handling for 'en' language input
Dec 10, 2021
f908f76
more PR feedback updates
ambrauer Dec 10, 2021
dd4363b
Resolve comments, make tests green
Dec 10, 2021
69d9c0b
Merge branch 'diy-generator' of github.com:Sitecore/jss into diy-gene…
Dec 10, 2021
5b6f71f
Update yarn.lock - fix CI
Dec 10, 2021
f628974
Add del-cli
Dec 10, 2021
0b20589
Dynamically import watch.json, error when not there
Dec 10, 2021
c44db63
Merge branch 'diy-generator' of github.com:Sitecore/jss into diy-gene…
addy-pathania Dec 13, 2021
9813185
Merge branch 'diy-generator' into feature/504957-vue-initializer
addy-pathania Dec 13, 2021
7edb330
rebased
addy-pathania Dec 13, 2021
44b7a71
updated vue args
addy-pathania Dec 14, 2021
19f1adb
added ejs token and prefixes
addy-pathania Dec 15, 2021
fcfd0d7
updated package.json
addy-pathania Dec 15, 2021
b3026e6
added ejs confitional to graphql and rest factory
addy-pathania Dec 15, 2021
d5641c6
updated files with ejs tokens and updated {{language}}.yml files
addy-pathania Dec 16, 2021
96de4ff
removed space and extra keywords from ejs tokens
addy-pathania Dec 16, 2021
6926f28
fixed ejs conditional for language file
addy-pathania Dec 16, 2021
f3214aa
formatted ejs conditonals
addy-pathania Dec 17, 2021
c536997
Merge branch 'dev' into feature/504957-vue-initializer
addy-pathania Dec 17, 2021
ba0473e
filtered index.html through regex
addy-pathania Dec 17, 2021
1b2baa8
fixed indentation issues
addy-pathania Dec 17, 2021
9c468ce
added index.html to regex
addy-pathania Dec 17, 2021
83cf0a4
Update regex, prettierrc, some ejs tokens
Dec 17, 2021
7974f49
Merge branch 'dev' of github.com:Sitecore/jss into feature/504957-vue…
Dec 17, 2021
9579298
Fix angular templates missing hyphens
Dec 17, 2021
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
2 changes: 1 addition & 1 deletion packages/create-sitecore-jss/src/common/steps/transform.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import {
import { diffLines, diffJson, Change } from 'diff';
import { BaseArgs } from '../args/base';

const COPY_ONLY_REGEX = /\.(gif|jpg|jpeg|tiff|png|svg|ashx|ico|pdf|jar)$/;
const COPY_ONLY_REGEX = /(index\.html)$|\.(gif|jpg|jpeg|tiff|png|svg|ashx|ico|pdf|jar)$/;

export type JsonPropertyType = number | string | (number | string)[] | JsonObjectType;
export interface JsonObjectType {
Expand Down
5 changes: 5 additions & 0 deletions packages/create-sitecore-jss/src/initializers/vue/args.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import { ClientAppArgs } from './../../common/args/base';
import { VueAnswer } from './prompts';
import { StyleguideArgs } from '../../common/args/styleguide';

export interface VueArgs extends ClientAppArgs, StyleguideArgs, Partial<VueAnswer> {}
47 changes: 47 additions & 0 deletions packages/create-sitecore-jss/src/initializers/vue/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
import path from 'path';
import { prompt } from 'inquirer';
import { prompts, VueAnswer } from './prompts';
import { Initializer } from '../../common/Initializer';
import { transform } from '../../common/steps';
import { VueArgs } from './args';
import { FetchWith } from '../../common/prompts/base';
import chalk from 'chalk';

export default class VueInitializer implements Initializer {
get isBase() {
return true;
}

async init(args: VueArgs) {
const defaults = args.yes
? {
appName: 'sitecore-jss-vue',
hostName: 'sitecore-jss-vue.dev.local',
fetchWith: FetchWith.GraphQL,
appPrefix: true,
language: '',
}
: {};

const answers = await prompt<VueAnswer>(prompts, { ...defaults, ...args });

const mergedArgs = {
...args,
...answers,
};

const templatePath = path.resolve(__dirname, '../../templates/vue');
await transform(templatePath, mergedArgs, {
filter: (filePath) => {
return !!mergedArgs.language || !filePath.endsWith('{{language}}.yml');
},
});

const response = {
appName: answers.appName,
nextSteps: [`* Connect to Sitecore with ${chalk.green('jss setup')} (optional)`],
};

return response;
}
}
6 changes: 6 additions & 0 deletions packages/create-sitecore-jss/src/initializers/vue/prompts.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import { ClientAppAnswer, clientAppPrompts } from '../../common/prompts/base';
import { StyleguideAnswer, styleguidePrompts } from '../../common/prompts/styleguide';

export interface VueAnswer extends ClientAppAnswer, StyleguideAnswer {}

export const prompts = [...clientAppPrompts, ...styleguidePrompts];
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ fields:
content: <p>Custom route type fields are good for things like articles, where you may wish to have a filter UI on content fields, such as author or category. Route level fields are easy to query against, whereas component-level fields are not because it's possible to remove a component from a route. Note that route level fields <em>cannot be personalized</em> because you cannot conditionally swap out the route item for a different content item.</p>
placeholders:
<%- helper.getAppPrefix(appPrefix, appName) %>jss-main:
- componentName: StyleguideCustomRouteType
- componentName: Styleguide-CustomRouteType
Original file line number Diff line number Diff line change
Expand Up @@ -8,26 +8,26 @@ placeholders:
content: |
<p>This is a live set of examples of how to use JSS. For more information on using JSS, please see <a href="https://jss.sitecore.com" target="_blank" rel="noopener noreferrer">the documentation</a>.</p>
<p>The content and layout of this page is defined in <code>/data/routes/styleguide/en.yml</code></p>
- componentName: StyleguideLayout
- componentName: Styleguide-Layout
placeholders:
<%- helper.getAppPrefix(appPrefix, appName) %>jss-styleguide-layout:
- componentName: StyleguideSection
- componentName: Styleguide-Section
fields:
heading: Content Data
placeholders:
<%- helper.getAppPrefix(appPrefix, appName) %>jss-styleguide-section:
- componentName: StyleguideFieldUsageText
- componentName: Styleguide-FieldUsage-Text
fields:
heading: Single-Line Text
sample: This is a sample text field. <mark>HTML is encoded.</mark> In Sitecore, editors will see a <input type="text">.
sample2: This is another sample text field using rendering options. <mark>HTML supported with encode=false.</mark> Cannot edit because editable=false.
- componentName: StyleguideFieldUsageText
- componentName: Styleguide-FieldUsage-Text
fields:
heading: Multi-Line Text
description: '<small>Multi-line text tells Sitecore to use a <code>textarea</code> for editing; consumption in JSS is the same as single-line text.</small>'
sample: This is a sample multi-line text field. <mark>HTML is encoded.</mark> In Sitecore, editors will see a textarea.
sample2: This is another sample multi-line text field using rendering options. <mark>HTML supported with encode=false.</mark>
- componentName: StyleguideFieldUsageRichText
- componentName: Styleguide-FieldUsage-RichText
fields:
heading: Rich Text
sample: <p>This is a sample rich text field. <mark>HTML is always supported.</mark> In Sitecore, editors will see a WYSIWYG editor for these fields.</p>
Expand All @@ -36,7 +36,7 @@ placeholders:
sample2: |
<p>Another sample rich text field, using options. Keep markup entered in rich text fields as simple as possible - ideally bare tags only (no classes). Adding a wrapping class can help with styling within rich text blocks.</p>
<marquee>But you can use any valid HTML in a rich text field!</marquee>
- componentName: StyleguideFieldUsageImage
- componentName: Styleguide-FieldUsage-Image
fields:
heading: Image
sample1:
Expand All @@ -45,7 +45,7 @@ placeholders:
sample2:
src: /data/media/img/jss_logo.png
alt: Sitecore JSS Logo
- componentName: StyleguideFieldUsageFile
- componentName: Styleguide-FieldUsage-File
fields:
heading: File
description: |
Expand All @@ -54,28 +54,27 @@ placeholders:
src: /data/media/files/jss.pdf
title: Example File
description: This data will be added to the Sitecore Media Library on import
- componentName: StyleguideFieldUsageNumber
- componentName: Styleguide-FieldUsage-Number
fields:
heading: Number
description: '<small>Number tells Sitecore to use a number entry for editing.</small>'
sample: 1.21
sample2: 71
- componentName: StyleguideFieldUsageCheckbox
- componentName: Styleguide-FieldUsage-Checkbox
fields:
heading: Checkbox
description: |
<small>Note: Sitecore does not support inline editing of Checkbox fields. The value must be edited in Experience Editor by using the edit rendering fields button (looks like a pencil) with the whole component selected.</small>
checkbox: true
checkbox2: false
- componentName: StyleguideFieldUsageDate
- componentName: Styleguide-FieldUsage-Date
fields:
heading: Date
description: |
<p><small>Both <code>Date</code> and <code>DateTime</code> field types are available. Choosing <code>DateTime</code> will make Sitecore show editing UI for time; both types store complete date and time values internally. Date values in JSS are formatted using <a href="https://en.wikipedia.org/wiki/ISO_8601#Combined_date_and_time_representations" target="_blank">ISO 8601 formatted strings</a>, for example <code>2012-04-23T18:25:43.511Z</code>.</small></p>
<div class="alert alert-warning"><small>Note: this is a JavaScript date format (e.g. <code>new Date().toISOString()</code>), and is different from how Sitecore stores date field values internally. Sitecore-formatted dates will not work.</small></div>
date: '2012-05-04T00:00:00.000Z'
dateTime: '2018-03-14T15:00:00.000Z'
- componentName: StyleguideFieldUsageLink
date: '2012-05-04T00:00:00Z'
dateTime: '2018-03-14T15:00:00Z'
- componentName: Styleguide-FieldUsage-Link
fields:
heading: General Link
description: <p>A <em>General Link</em> is a field that represents an <code>&lt;a&gt;</code> tag.</p>
Expand All @@ -102,7 +101,7 @@ placeholders:
target: _blank
class: font-weight-bold
title: <a> title attribute
- componentName: StyleguideFieldUsageItemLink
- componentName: Styleguide-FieldUsage-ItemLink
fields:
heading: Item Link
description: |
Expand All @@ -124,7 +123,7 @@ placeholders:
template: <%- helper.getAppPrefix(appPrefix, appName) %>Styleguide-ItemLink-Item-Template
fields:
textField: Referenced item textField
- componentName: StyleguideFieldUsageContentList
- componentName: Styleguide-FieldUsage-ContentList
fields:
heading: Content List
description: |
Expand Down Expand Up @@ -155,7 +154,7 @@ placeholders:
- template: <%- helper.getAppPrefix(appPrefix, appName) %>Styleguide-ContentList-Item-Template
fields:
textField: Hello World Item 2
- componentName: StyleguideFieldUsageCustom
- componentName: Styleguide-FieldUsage-Custom
fields:
heading: Custom Fields
description: |
Expand All @@ -167,12 +166,14 @@ placeholders:
</small>
</p>
customIntField: 31337
- componentName: StyleguideSection
- componentName: Styleguide-Section
fields:
heading: Layout Patterns
placeholders:
<%- helper.getAppPrefix(appPrefix, appName) %>jss-header:
- componentName: Styleguide-Layout-Reuse
<%- helper.getAppPrefix(appPrefix, appName) %>jss-styleguide-section:
- componentName: StyleguideLayoutReuse
- componentName: Styleguide-Layout-Reuse
fields:
heading: Reusing Content
description: <p>JSS provides powerful options to reuse content, whether it's sharing a common piece of text across pages or sketching out a site with repeating <em>lorem ipsum</em> content.</p>
Expand All @@ -189,38 +190,38 @@ placeholders:
- componentName: ContentBlock
fields:
content: <p>Mix and match reused and local content. Check out <code>/data/routes/styleguide/en.yml</code> to see how.</p>
- componentName: StyleguideLayoutTabs
- componentName: Styleguide-Layout-Tabs
fields:
heading: Tabs
description: <p>Creating hierarchical components like tabs is made simpler in JSS because it's easy to introspect the layout structure.</p>
placeholders:
<%- helper.getAppPrefix(appPrefix, appName) %>jss-tabs:
- componentName: StyleguideLayoutTabsTab
- componentName: Styleguide-Layout-Tabs-Tab
fields:
title: Tab 1
content: <p>Tab 1 contents!</p>
- componentName: StyleguideLayoutTabsTab
- componentName: Styleguide-Layout-Tabs-Tab
fields:
title: Tab 2
content: <p>Tab 2 contents!</p>
- componentName: StyleguideLayoutTabsTab
- componentName: Styleguide-Layout-Tabs-Tab
fields:
title: Tab 3
content: <p>Tab 3 contents!</p>
- componentName: StyleguideSection
- componentName: Styleguide-Section
fields:
heading: Sitecore Patterns
placeholders:
<%- helper.getAppPrefix(appPrefix, appName) %>jss-styleguide-section:
- componentName: StyleguideSitecoreContext
- componentName: Styleguide-SitecoreContext
fields:
heading: Sitecore Context
description: <p><small>The Sitecore Context contains route-level data about the current context - for example, <code>pageState</code> enables conditionally executing code based on whether Sitecore is in Experience Editor or not.</small></p>
- componentName: StyleguideRouteFields
- componentName: Styleguide-RouteFields
fields:
heading: Route-level Fields
description: <p><small>Route-level content fields are defined on the <em>route</em> instead of on a <em>component</em>. This allows multiple components to share the field data on the same route - and querying is much easier on route level fields, making <em>custom route types</em> ideal for filterable/queryable data such as articles.</small></p>
- componentName: StyleguideComponentParams
- componentName: Styleguide-ComponentParams
fields:
heading: Component Params
description: <p><small>Component params (also called Rendering Parameters) allow storing non-content parameters for a component. These params should be used for more technical options such as CSS class names or structural settings.</small></p>
Expand All @@ -230,24 +231,24 @@ placeholders:
# they are always sent to the component as strings.
columns: 5
useCallToAction: true
- componentName: StyleguideTracking
- componentName: Styleguide-Tracking
fields:
heading: Tracking
description: <p><small>JSS supports tracking Sitecore analytics events from within apps. Give it a try with this handy interactive demo.</small></p>
- componentName: StyleguideSection
- componentName: Styleguide-Section
fields:
heading: Multilingual Patterns
placeholders:
<%- helper.getAppPrefix(appPrefix, appName) %>jss-styleguide-section:
- componentName: StyleguideMultilingual
- componentName: Styleguide-Multilingual
fields:
heading: Translation Patterns
sample: This text can be translated in en.yml
- componentName: StyleguideSection
- componentName: Styleguide-Section
fields:
heading: Angular Patterns
placeholders:
<%- helper.getAppPrefix(appPrefix, appName) %>jss-styleguide-section:
- componentName: StyleguideAngularLazyLoading
- componentName: Styleguide-Angular-LazyLoading
fields:
heading: Lazy Loading
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"semi": true,
"singleQuote": true,
"tabWidth": 2,
"useTabs": false,
"trailingComma": "es5",
"printWidth": 100
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
> 1%
last 2 versions
not ie <= 8
15 changes: 15 additions & 0 deletions packages/create-sitecore-jss/src/templates/vue/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
module.exports = {
root: true,
env: {
node: true,
},
extends: ['plugin:vue/vue3-essential', '@vue/prettier', 'plugin:yaml/recommended'],
plugins: ['yaml'],
rules: {
'no-console': 'off',
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off',
},
parserOptions: {
parser: 'babel-eslint',
},
};
25 changes: 25 additions & 0 deletions packages/create-sitecore-jss/src/templates/vue/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
.DS_Store
node_modules
/dist

/tests/e2e/videos/
/tests/e2e/screenshots/

# local env files
.env.local
.env.*.local

# Log files
*.log*

# Editor directories and files
.idea
.vscode
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw*

scjssconfig.json
*.deploysecret.config
5 changes: 5 additions & 0 deletions packages/create-sitecore-jss/src/templates/vue/.postcssrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module.exports = {
plugins: {
autoprefixer: {},
},
};
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
package.json
9 changes: 9 additions & 0 deletions packages/create-sitecore-jss/src/templates/vue/.prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"endOfLine": "crlf",
"singleQuote": true,
"trailingComma": "es5",
"useTabs": false,
"tabWidth": 2,
"arrowParens": "always",
"printWidth": 100
}
Loading