Toggle navigation
Toggle navigation
This project
Loading...
Sign in
오윤석
/
maplespec.ga
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
4
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
오윤석
2020-06-03 23:01:04 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
f27b14c2a7ed33c8263f2d688cf281e46afbc7e6
f27b14c2
1 parent
c98d2f65
livereload 삭제
docker 환경에서 사용이 어려워 삭제함
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
55 additions
and
61 deletions
app/web/package-lock.json
app/web/package.json
app/web/rollup.config.js
app/web/package-lock.json
View file @
f27b14c
This diff is collapsed. Click to expand it.
app/web/package.json
View file @
f27b14c
...
...
@@ -10,7 +10,6 @@
"@rollup/plugin-commonjs"
:
"11.0.2"
,
"@rollup/plugin-node-resolve"
:
"^7.0.0"
,
"rollup"
:
"^1.20.0"
,
"rollup-plugin-livereload"
:
"^1.0.0"
,
"rollup-plugin-svelte"
:
"^5.0.3"
,
"rollup-plugin-terser"
:
"^5.1.2"
,
"svelte"
:
"^3.0.0"
...
...
app/web/rollup.config.js
View file @
f27b14c
import
svelte
from
'rollup-plugin-svelte'
;
import
resolve
from
'@rollup/plugin-node-resolve'
;
import
commonjs
from
'@rollup/plugin-commonjs'
;
import
livereload
from
'rollup-plugin-livereload'
;
import
{
terser
}
from
'rollup-plugin-terser'
;
import
copy
from
'rollup-plugin-copy'
;
const
production
=
!
process
.
env
.
ROLLUP_WATCH
;
export
default
{
input
:
'src/main.js'
,
output
:
{
sourcemap
:
true
,
format
:
'iife'
,
name
:
'app'
,
file
:
'public/build/bundle.js'
},
plugins
:
[
svelte
({
// enable run-time checks when not in production
dev
:
!
production
,
// we'll extract any component CSS out into
// a separate file - better for performance
css
:
css
=>
{
css
.
write
(
'public/build/bundle.css'
);
}
}),
input
:
'src/main.js'
,
output
:
{
sourcemap
:
true
,
format
:
'iife'
,
name
:
'app'
,
file
:
'public/build/bundle.js'
},
plugins
:
[
svelte
({
// enable run-time checks when not in production
dev
:
!
production
,
// we'll extract any component CSS out into
// a separate file - better for performance
css
:
css
=>
{
css
.
write
(
'public/build/bundle.css'
);
}
}),
// If you have external dependencies installed from
// npm, you'll most likely need these plugins. In
// some cases you'll need additional configuration -
// consult the documentation for details:
// https://github.com/rollup/plugins/tree/master/packages/commonjs
resolve
({
browser
:
true
,
dedupe
:
[
'svelte'
]
}),
commonjs
(),
// If you have external dependencies installed from
// npm, you'll most likely need these plugins. In
// some cases you'll need additional configuration -
// consult the documentation for details:
// https://github.com/rollup/plugins/tree/master/packages/commonjs
resolve
({
browser
:
true
,
dedupe
:
[
'svelte'
]
}),
commonjs
(),
copy
({
targets
:
[
{
src
:
'src/images'
,
dest
:
'public'
}
]
}),
copy
({
targets
:
[
{
src
:
'src/images'
,
dest
:
'public'
}
]
}),
// In dev mode, call `npm run start` once
// the bundle has been generated
!
production
&&
serve
(),
// In dev mode, call `npm run start` once
// the bundle has been generated
!
production
&&
serve
(),
// Watch the `public` directory and refresh the
// browser on changes when not in production
!
production
&&
livereload
(
'public'
),
// If we're building for production (npm run build
// instead of npm run dev), minify
production
&&
terser
()
],
watch
:
{
clearScreen
:
false
}
// If we're building for production (npm run build
// instead of npm run dev), minify
production
&&
terser
()
],
watch
:
{
clearScreen
:
false
}
};
function
serve
()
{
let
started
=
false
;
let
started
=
false
;
return
{
writeBundle
()
{
if
(
!
started
)
{
started
=
true
;
return
{
writeBundle
()
{
if
(
!
started
)
{
started
=
true
;
require
(
'child_process'
).
spawn
(
'npm'
,
[
'run'
,
'start'
,
'--'
,
'--dev'
],
{
stdio
:
[
'ignore'
,
'inherit'
,
'inherit'
],
shell
:
true
});
}
}
};
}
require
(
'child_process'
).
spawn
(
'npm'
,
[
'run'
,
'start'
,
'--'
,
'--dev'
],
{
stdio
:
[
'ignore'
,
'inherit'
,
'inherit'
],
shell
:
true
});
}
}
};
}
\ No newline at end of file
...
...
Please
register
or
login
to post a comment