diff --git a/config/paths.js b/config/paths.js index ebc82f43..2fdaaa33 100644 --- a/config/paths.js +++ b/config/paths.js @@ -6,10 +6,10 @@ const ownModules = path.resolve(__dirname, '../node_modules') let paths = { appRoot, - entry: path.resolve('./src/index.js'), + entry: path.resolve('./public/js/index.js'), dist: path.resolve('./dist'), - template: path.resolve('./src/index.html'), - favicon: path.resolve('./src/favicon.ico'), + template: path.resolve('./public/index.html'), + favicon: path.resolve('./public/favicon.ico'), elmPkg: path.resolve('elm-package.json'), scripts: path.resolve(__dirname, '../scripts'), elmMake: path.resolve(__dirname, '../node_modules/.bin/elm-make'), diff --git a/template/src/main.css b/template/public/css/main.css similarity index 100% rename from template/src/main.css rename to template/public/css/main.css diff --git a/template/src/favicon.ico b/template/public/favicon.ico similarity index 100% rename from template/src/favicon.ico rename to template/public/favicon.ico diff --git a/template/src/index.html b/template/public/index.html similarity index 100% rename from template/src/index.html rename to template/public/index.html diff --git a/template/public/js/index.js b/template/public/js/index.js new file mode 100644 index 00000000..c187b5cd --- /dev/null +++ b/template/public/js/index.js @@ -0,0 +1,8 @@ +import '../css/main.css' + +const logoPath = require('../media/logo.svg') +const Elm = require('../../src/App.elm') + +const root = document.getElementById('root') + +Elm.App.embed(root, logoPath) diff --git a/template/src/logo.svg b/template/public/media/logo.svg similarity index 100% rename from template/src/logo.svg rename to template/public/media/logo.svg diff --git a/template/src/index.js b/template/src/index.js deleted file mode 100644 index e93b8eba..00000000 --- a/template/src/index.js +++ /dev/null @@ -1,7 +0,0 @@ -import './main.css' -const logoPath = require('./logo.svg') -const Elm = require('./App.elm') - -const root = document.getElementById('root') - -Elm.App.embed(root, logoPath)