Skip to content

Commit

Permalink
Merge pull request #1736 from OpenC3/ace-diff-vite
Browse files Browse the repository at this point in the history
Migrate ace-diff from Webpack to Vite
  • Loading branch information
ryanmelt authored Dec 8, 2024
2 parents 7e206e2 + bc1ed32 commit 83b3d21
Show file tree
Hide file tree
Showing 10 changed files with 33 additions and 134 deletions.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,8 @@ export default [...compat.extends("plugin:prettier/recommended"), {
...globals.node,
},

ecmaVersion: 5,
sourceType: "commonjs",

parserOptions: {
parser: "@babel/eslint-parser",
},
ecmaVersion: 2020,
sourceType: "module",
},

rules: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,8 @@
"source": "src/index.js",
"main": "dist/ace-diff.min.js",
"scripts": {
"build": "webpack --mode=production --node-env=production",
"build:dev": "webpack --mode=development",
"build:prod": "webpack --mode=production --node-env=production",
"watch": "webpack --watch"
"build": "vite build",
"lint": "eslint src"
},
"repository": {
"type": "git",
Expand All @@ -18,24 +16,9 @@
"author": "Ben Keen, Jason Thomas",
"license": "MIT",
"devDependencies": {
"@babel/core": "^7.26.0",
"@babel/plugin-proposal-class-properties": "7.18.6",
"@babel/plugin-syntax-dynamic-import": "7.8.3",
"@babel/plugin-transform-runtime": "7.25.9",
"@babel/preset-env": "^7.26.0",
"@babel/runtime": "7.26.0",
"@webpack-cli/generators": "^3.0.7",
"babel-loader": "^9.2.1",
"babel-plugin-istanbul": "7.0.0",
"eslint": "9.16.0",
"file-loader": "^6.2.0",
"prettier": "3.3.3",
"sass": "1.80.4",
"sass-loader": "16.0.2",
"webpack": "^5.95.0",
"webpack-cli": "^5.1.4",
"webpack-dev-server": "5.1.0",
"webpack-merge": "6.0.1",
"webpack-remove-empty-scripts": "^1.0.4"
"vite": "5.4.11"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import { defineConfig } from 'vite'

export default defineConfig({
build: {
sourcemap: true,
rollupOptions: {
input: ['./src/index.js', './src/styles/ace-diff.scss', './src/styles/ace-diff-dark.scss'],
output: {
entryFileNames: 'ace-diff.min.js',
assetFileNames: '[name].min[extname]',
},
preserveEntrySignatures: 'strict',
},
},
})

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -83,15 +83,15 @@
System.import('vue'),
]).then(function (modules) {
System.set(System.resolve('vue'), window.Vue)
Promise.all([
return Promise.all([
System.import('vue-router'),
System.import('vuex'),
System.import('vuetify')
]).then(function (modules) {
System.set(System.resolve('vue-router'), window.VueRouter)
System.set(System.resolve('vuex'), window.Vuex)
System.import('@openc3/tool-base')
})
])
}).then(function (modules) {
System.set(System.resolve('vue-router'), window.VueRouter)
System.set(System.resolve('vuex'), window.Vuex)
System.import('@openc3/tool-base')
})
})()
</script>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,15 +83,15 @@
System.import('vue'),
]).then(function (modules) {
System.set(System.resolve('vue'), window.Vue)
Promise.all([
return Promise.all([
System.import('vue-router'),
System.import('vuex'),
System.import('vuetify')
]).then(function (modules) {
System.set(System.resolve('vue-router'), window.VueRouter)
System.set(System.resolve('vuex'), window.Vuex)
System.import('@openc3/tool-base')
})
])
}).then(function (modules) {
System.set(System.resolve('vue-router'), window.VueRouter)
System.set(System.resolve('vuex'), window.Vuex)
System.import('@openc3/tool-base')
})
})()
</script>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,7 @@ import 'ace-builds/src-min-noconflict/mode-ruby'
import 'ace-builds/src-min-noconflict/theme-twilight'
import 'ace-builds/src-min-noconflict/ext-language_tools'
import 'ace-builds/src-min-noconflict/ext-searchbox'
import * as AceDiff from '@openc3/ace-diff'
import '@openc3/ace-diff/dist/ace-diff.min.css'
import AceDiff from '@openc3/ace-diff'
import '@openc3/ace-diff/dist/ace-diff-dark.min.css'
import { toRaw } from 'vue'

Expand Down

0 comments on commit 83b3d21

Please sign in to comment.