Skip to content

Commit b71a7ed

Browse files
committed
refactor(template): Rename Main.elm to App.elm that fix incorrect tests import
In template/tests/Tests.elm is imported App module. But it doesn't exist
1 parent 9566375 commit b71a7ed

File tree

6 files changed

+9
-9
lines changed

6 files changed

+9
-9
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,11 +51,11 @@ my-app/
5151
README.md
5252
elm-package.json
5353
src/
54+
App.elm
5455
favicon.ico
5556
index.html
5657
index.js
5758
main.css
58-
Main.elm
5959
tests/
6060
elm-package.json
6161
Main.elm

template/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,11 +53,11 @@ my-app/
5353
README.md
5454
elm-package.json
5555
src/
56+
App.elm
5657
favicon.ico
5758
index.html
5859
index.js
5960
main.css
60-
Main.elm
6161
tests/
6262
elm-package.json
6363
Main.elm
@@ -133,7 +133,7 @@ Here is an example:
133133
```js
134134
require('./main.css');
135135
var logoPath = require('./logo.svg'); // Tell Webpack this JS file uses this image
136-
var Elm = require('./Main.elm');
136+
var Elm = require('./App.elm');
137137

138138
var root = document.getElementById('root');
139139

template/src/Main.elm renamed to template/src/App.elm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
module Main exposing (..)
1+
module App exposing (..)
22

33
import Html exposing (Html, text, div, img)
44
import Html.Attributes exposing (src)

template/src/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
require('./main.css');
22
var logoPath = require('./logo.svg');
3-
var Elm = require('./Main.elm');
3+
var Elm = require('./App.elm');
44

55
var root = document.getElementById('root');
66

File renamed without changes.

tests/elm-app.build.spec.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,15 +39,15 @@ describe('Building Elm application with `elm-app build`', function () {
3939
}).timeout(12 * 60 * 1000);
4040

4141
it('`elm-app build` should exit with non zero status code when build failed', function () {
42-
const normalFile = path.join(testAppDir, 'src/Main.elm');
43-
const malformedFile = path.join(rootDir, './tests/data/Main.elm');
42+
const normalFile = path.join(testAppDir, 'src/App.elm');
43+
const malformedFile = path.join(rootDir, './tests/data/App.elm');
4444

45-
copyFileSync(normalFile, 'Main.elm-normal');
45+
copyFileSync(normalFile, 'App.elm-normal');
4646
copyFileSync(malformedFile, normalFile);
4747

4848
const result = spawn.sync('node', [ elmAppCmd, 'build' ]);
4949

50-
const oldNormalFile = path.resolve('Main.elm-normal');
50+
const oldNormalFile = path.resolve('App.elm-normal');
5151
copyFileSync(oldNormalFile, normalFile);
5252
fs.unlink(oldNormalFile);
5353

0 commit comments

Comments
 (0)