Skip to content

Commit

Permalink
ci: fix input test and add gulp build task (#217)
Browse files Browse the repository at this point in the history
  • Loading branch information
danranVm authored Feb 26, 2021
1 parent 0b3dc61 commit 6fe753c
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 6 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"private": true,
"scripts": {
"start": "gulp start:dev",
"build": "vite build",
"build": "gulp build",
"icons": "gulp icons:start",
"gen": "ts-node --project scripts/gen/tsconfig.json scripts/gen/index.ts",
"postinstall": "lerna bootstrap",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`Affix.vue render work 1`] = `"<div class=\\"ix-affix-wrapper\\"><div class=\\"ix-affix\\"></div></div>"`;
exports[`Affix.vue render work 1`] = `"<div class=\\"ix-affix\\"><div class=\\"ix-affix-content\\"></div></div>"`;
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`Input.vue render work 1`] = `"<span class=\\"ix-input ix-input-medium\\"><!--v-if--><span class=\\"ix-input-wrapper\\"><!--v-if--><input class=\\"ix-input-inner\\"><!--v-if--><!--v-if--></span><!--v-if--></span>"`;
exports[`Input.vue render work 1`] = `"<span class=\\"ix-input ix-input-medium\\"><!--v-if--><span class=\\"ix-input-wrapper\\"><!--v-if--><input class=\\"ix-input-inner\\"><!--v-if--><!--v-if--></span><!--v-if--></span>"`;
2 changes: 2 additions & 0 deletions scripts/gulp/gulpfile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,5 @@ import './tasks/icons'
task('start:dev', series('icons:copy', 'site:start'))

task('start:icons', series('clean:icons', 'icons:start'))

task('build', series('icons:copy', 'site:build'))
11 changes: 8 additions & 3 deletions scripts/gulp/tasks/site.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,22 @@ import { execNodeTask } from '../util/task-helpers'
import { initSite } from '../site'

/** Parse demos and docs to site directory. */
task('site:init', done => {
task('init:site', done => {
initSite()
done()
})

/** Run `vite` */
task('site:serve', done => {
task('serve:site', done => {
detectPort(3000).then((port: number) => {
execNodeTask('vite', 'vite', ['--port', port === 3000 ? '3000' : '0', '--open'])(done)
})
})

/** Run `vite build` */
task('build:site', execNodeTask('vite', 'vite', ['build']))

/** Init site directory, and start watch and vite */
task('site:start', series('site:init', 'site:serve'))
task('site:start', series('init:site', 'serve:site'))

task('site:build', series('init:site', 'build:site'))

0 comments on commit 6fe753c

Please sign in to comment.