Skip to content

Commit b595389

Browse files
committed
update format explorer
1 parent 16749dd commit b595389

File tree

7 files changed

+275
-231
lines changed

7 files changed

+275
-231
lines changed

format-explorer/package.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,24 +11,24 @@
1111
"clean": "rm -rf ./dist"
1212
},
1313
"devDependencies": {
14-
"@vue/compiler-sfc": "^3.0.2",
14+
"@vue/compiler-sfc": "^3.0.4",
1515
"css-loader": "^5.0.0",
1616
"file-loader": "^6.2.0",
1717
"html-webpack-plugin": "^4.5.0",
1818
"monaco-editor-webpack-plugin": "^2.0.0",
1919
"style-loader": "^2.0.0",
20-
"ts-loader": "^8.0.0",
21-
"typescript": "^4.0.3",
20+
"ts-loader": "^8.0.12",
21+
"typescript": "^4.1.3",
2222
"url-loader": "^4.1.0",
23-
"vue-loader": "^16.0.0-rc.1",
24-
"webpack": "^5.4.0",
23+
"vue-loader": "^16.1.0",
24+
"webpack": "^5.10.0",
2525
"webpack-cli": "^4.2.0",
2626
"webpack-dev-server": "^3.11.0"
2727
},
2828
"dependencies": {
2929
"monaco-editor": "^0.21.2",
3030
"source-map": "^0.6.1",
31-
"vue": "^3.0.2",
32-
"vue-i18n": "link:.."
31+
"vue": "^3.0.4",
32+
"@intlify/message-compiler": "link:../packages/message-compiler"
3333
}
3434
}

format-explorer/src/App.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22
import { defineComponent, ref } from 'vue'
33
import Navigation from './components/Navigation.vue'
44
import Editor from './components/Editor.vue'
5-
import { baseCompile } from 'vue-i18n'
5+
import { baseCompile } from '@intlify/message-compiler'
66
import * as monaco from 'monaco-editor'
77
import { debounce } from './utils'
88
import { SourceMapConsumer } from 'source-map'
9-
import type { CompileError, CompileOptions } from 'vue-i18n'
9+
import type { CompileError, CompileOptions } from '@intlify/message-compiler'
1010
1111
interface PersistedState {
1212
src?: string

format-explorer/src/components/Editor.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import theme from '../theme'
44
import { debounce } from '../utils'
55
import * as monaco from 'monaco-editor'
66
import type { PropType } from 'vue'
7-
import type { CompileError } from 'vue-i18n'
7+
import type { CompileError } from '@intlify/message-compiler'
88
99
export default defineComponent({
1010
name: 'Editor',

format-explorer/webpack.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ module.exports = {
1616
},
1717
alias: {
1818
vue: require.resolve('vue/dist/vue.esm-bundler.js'),
19-
'vue-i18n': require.resolve('vue-i18n/dist/vue-i18n.cjs.js')
19+
'@intlify/message-compiler': require.resolve('../packages/message-compiler/dist/message-compiler.cjs.js')
2020
}
2121
},
2222
module: {

format-explorer/yarn.lock

Lines changed: 258 additions & 214 deletions
Large diffs are not rendered by default.

scripts/build.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ formats to output (defaults to `buildOptions.formats` specified in that package,
66
or "esm,cjs"):
77
88
```
9-
# name supports fuzzy match. will build all packages with name containing "dom":
10-
yarn build dom
9+
# name supports fuzzy match. will build all packages with name containing "core-base":
10+
yarn build core-base
1111
1212
# specify the format to output
1313
yarn build core --formats cjs

scripts/dev.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ To specific the package to watch, simply pass its name and the desired build
55
formats to watch (defaults to "global"):
66
77
```
8-
# name supports fuzzy match. will watch all packages with name containing "dom"
9-
yarn dev dom
8+
# name supports fuzzy match. will watch all packages with name containing "core-base"
9+
yarn dev core-base
1010
1111
# specify the format to output
1212
yarn dev core --formats cjs
@@ -22,15 +22,15 @@ const args = require('minimist')(process.argv.slice(2))
2222
const target = args._.length ? fuzzyMatchTarget(args._)[0] : 'vue-i18n'
2323
const formats = args.formats || args.f
2424
const sourceMap = args.sourcemap || args.s
25-
// const commit = execa.sync('git', ['rev-parse', 'HEAD']).stdout.slice(0, 7)
25+
const commit = execa.sync('git', ['rev-parse', 'HEAD']).stdout.slice(0, 7)
2626

2727
execa(
2828
'rollup',
2929
[
3030
'-wc',
3131
'--environment',
3232
[
33-
// `COMMIT:${commit}`,
33+
`COMMIT:${commit}`,
3434
`TARGET:${target}`,
3535
`FORMATS:${formats || 'global'}`,
3636
sourceMap ? `SOURCE_MAP:true` : ``

0 commit comments

Comments
 (0)