Skip to content

Commit

Permalink
Merge branch 'master' into feature_pass_number
Browse files Browse the repository at this point in the history
  • Loading branch information
remote-star authored Apr 26, 2018
2 parents 999a355 + 0460a76 commit 6821b5f
Show file tree
Hide file tree
Showing 48 changed files with 80 additions and 6 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ title: 更新日志
---

<!-- CUTOFF -->
### 1.0.9
`2018-04-26`
- 修复issue#47

### 1.0.8
`2018-04-24`
- Button组件点击事件无需`.native`修饰符
Expand Down
17 changes: 15 additions & 2 deletions build/rollup/build-component.rollup.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,18 @@ const babel = bluebird.promisifyAll(require('babel-core'))
const TARGET_LIB_BASE = 'lib'
const SRC_BASE = 'components'


function babelPluginInsertCssImportForVue ({ types: t }) {
function computedSameDirCssPosition(filePath) {
const filePathParse = path.parse(filePath)
return `./style/${filePathParse.name}.css`
}
const globalCssLiteral = '../_style/global.css'
return {
visitor: {
Program(path, state) {
const importLiteral = computedSameDirCssPosition(state.opts.filePath)
path.unshiftContainer('body', t.ImportDeclaration([],t.StringLiteral(importLiteral)))
path.unshiftContainer('body', t.ImportDeclaration([],t.StringLiteral(globalCssLiteral)))
}
}
}
Expand Down Expand Up @@ -141,6 +142,18 @@ function compileJsAndReplace(filePath){
})
}

function compileGlobalStylus() {
const filePath = path.resolve(TARGET_LIB_BASE, '_style/global.styl')
const targetPath = path.resolve(TARGET_LIB_BASE, '_style/global.css')
const fileContent = fs.readFileSync(filePath, {
encoding: 'utf8',
})
return compileVueStylus(fileContent, (err, cssContent) => {
fs.writeFileAsync(targetPath, cssContent)
})

}

function compileAndReplaceAllJsFile() {
const fileGlob = `${TARGET_LIB_BASE}/**/*.js`
const jsFiles = glob.sync(fileGlob)
Expand All @@ -162,7 +175,7 @@ function compileAndReplaceAllVueFile() {

function main() {
return move('lib')
.then(() => Promise.all([compileAndReplaceAllJsFile(), compileAndReplaceAllVueFile()]))
.then(() => Promise.all([compileAndReplaceAllJsFile(), compileAndReplaceAllVueFile(), compileGlobalStylus()]))
.catch(e => console.info(e))
}

Expand Down
1 change: 1 addition & 0 deletions docs/static/js/DesignResource.332e6cfe.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions docs/static/js/DocsChangelog.76d0f5a4.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions docs/static/js/DocsComponentsBasicActionBar.6d60f495.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions docs/static/js/DocsComponentsBasicButton.bc157ee0.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions docs/static/js/DocsComponentsBasicDropMenu.32942471.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions docs/static/js/DocsComponentsBasicIcon.e19b0778.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions docs/static/js/DocsComponentsBasicImageReader.e84fffa4.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions docs/static/js/DocsComponentsBasicImageViewer.aa1bd222.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions docs/static/js/DocsComponentsBasicNoticeBar.8fbfd18a.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions docs/static/js/DocsComponentsBasicStepper.27ddb897.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions docs/static/js/DocsComponentsBasicSteps.f5b52094.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions docs/static/js/DocsComponentsBasicSwiper.acb2a4cf.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions docs/static/js/DocsComponentsBasicTabBar.22ff758f.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions docs/static/js/DocsComponentsBasicTabs.23dce2f6.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions docs/static/js/DocsComponentsBasicTag.c82b4c08.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions docs/static/js/DocsComponentsBusinessCaptcha.18fa007d.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions docs/static/js/DocsComponentsBusinessCashier.5f757812.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions docs/static/js/DocsComponentsBusinessChart.b92a1df3.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions docs/static/js/DocsComponentsBusinessLandscape.d47c4972.js

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions docs/static/js/DocsComponentsFeedbackDialog.75a4f096.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions docs/static/js/DocsComponentsFeedbackPicker.ea0199cd.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions docs/static/js/DocsComponentsFeedbackPopup.1642108d.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions docs/static/js/DocsComponentsFeedbackSelector.82523070.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions docs/static/js/DocsComponentsFeedbackTabPicker.a49a471c.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions docs/static/js/DocsComponentsFeedbackTip.7fa062aa.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions docs/static/js/DocsComponentsFeedbackToast.fdd7ff30.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions docs/static/js/DocsComponentsFormAgree.2a5d1b73.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions docs/static/js/DocsComponentsFormCodebox.8477e82f.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions docs/static/js/DocsComponentsFormField.69b122c2.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions docs/static/js/DocsComponentsFormInputItem.3a070dc0.js

Large diffs are not rendered by default.

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions docs/static/js/DocsComponentsFormRadio.d532433c.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions docs/static/js/DocsComponentsFormSwitch.75c0b739.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions docs/static/js/DocsDevelopment.0b5604cf.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions docs/static/js/DocsIntroduce.b608357c.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions docs/static/js/DocsPreview.5d59e199.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions docs/static/js/DocsStarted.37a1fbde.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions docs/static/js/DocsTheme.dc48a789.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions docs/static/js/app.78b46c74.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions docs/static/js/manifest.32b000e7.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 14 additions & 0 deletions docs/static/js/vendor.b46908c4.js

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "mand-mobile",
"version": "1.0.8",
"version": "1.0.9",
"description": "A Vue.js 2.0 Mobile UI Toolkit",
"homepage": "https://github.com/didi/mand-mobile",
"main": "lib/mand-mobile.umd.js",
Expand All @@ -22,8 +22,8 @@
"assets"
],
"scripts": {
"dev:webpack": "webpack-dashboard -m -- node build/webpack/dev-server",
"dev": "node build/rollup/dev-server.rollup",
"dev": "webpack-dashboard -m -- node build/webpack/dev-server",
"dev:rollup": "node build/rollup/dev-server.rollup",
"dev:site": "cd site && npm start",
"create": "node build/component-init.js",
"cz": "git-cz",
Expand Down
2 changes: 1 addition & 1 deletion site/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"indices": "node ./build/bin/gen-indices --log"
},
"dependencies": {
"mand-mobile": "^1.0.7",
"mand-mobile": "^1.0.9",
"vue": "^2.5.2",
"vue-clipboard2": "^0.1.0",
"vue-qrcode-component": "^2.1.1",
Expand Down

0 comments on commit 6821b5f

Please sign in to comment.