質問編集履歴
2
気づいたことがありあました
test
CHANGED
File without changes
|
test
CHANGED
@@ -389,3 +389,17 @@
|
|
389
389
|
|
390
390
|
|
391
391
|
```
|
392
|
+
|
393
|
+
|
394
|
+
|
395
|
+
|
396
|
+
|
397
|
+
|
398
|
+
|
399
|
+
■追記2■
|
400
|
+
|
401
|
+
node.jsをインストールしていないじゃないか!と気づきました。
|
402
|
+
|
403
|
+
レンタルサーバーにインストールするにはどうしたらよいのでしょうか?
|
404
|
+
|
405
|
+
ブラウザ表示系のこと以外がさっぱりわからずで。。。FTPクライアントとのファイルのやりとりで、node.jsを設置できるのでしょうか?
|
1
ファイルの内容、サーバーについて
test
CHANGED
File without changes
|
test
CHANGED
@@ -7,3 +7,385 @@
|
|
7
7
|
どうしたら実行できるのか、なのか、なにかの設定が間違っているから、なのかの検討もついておらず、ざっくりした質問になってしまうのですが、
|
8
8
|
|
9
9
|
どうしたらレンタルサーバー上のサイトを見ることができるでしょうか?
|
10
|
+
|
11
|
+
|
12
|
+
|
13
|
+
|
14
|
+
|
15
|
+
■追記↓↓■
|
16
|
+
|
17
|
+
すみません。いろいろ情報を追記いたします。
|
18
|
+
|
19
|
+
|
20
|
+
|
21
|
+
|
22
|
+
|
23
|
+
[vue.js]
|
24
|
+
|
25
|
+
gitからテンプレートを落としてきたものに必要なコンポーネントや画像、cssを追加したもの
|
26
|
+
|
27
|
+
↓テンプレート
|
28
|
+
|
29
|
+
[vuejs-templates/webpack]
|
30
|
+
|
31
|
+
https://github.com/vuejs-templates/webpack
|
32
|
+
|
33
|
+
|
34
|
+
|
35
|
+
[サーバー]
|
36
|
+
|
37
|
+
・webcrow(phpオプション無)
|
38
|
+
|
39
|
+
|
40
|
+
|
41
|
+
[ディレクトリ]
|
42
|
+
|
43
|
+
●ローカル開発環境
|
44
|
+
|
45
|
+
localhost/[下記ディレクトリ・ファイル]
|
46
|
+
|
47
|
+
|
48
|
+
|
49
|
+
●サーバー
|
50
|
+
|
51
|
+
host/test/[下記ディレクトリ・ファイル]
|
52
|
+
|
53
|
+
|
54
|
+
|
55
|
+
|
56
|
+
|
57
|
+
```
|
58
|
+
|
59
|
+
├── build
|
60
|
+
|
61
|
+
│ ├── build.js
|
62
|
+
|
63
|
+
│ ├── check-versions.js
|
64
|
+
|
65
|
+
│ ├── logo.png
|
66
|
+
|
67
|
+
│ ├── utils.js
|
68
|
+
|
69
|
+
│ ├── vue-loader.conf.js
|
70
|
+
|
71
|
+
│ ├── webpack.base.conf.js
|
72
|
+
|
73
|
+
│ ├── webpack.dev.conf.js
|
74
|
+
|
75
|
+
│ ├── webpack.prod.conf.js
|
76
|
+
|
77
|
+
│ └── webpack.test.conf.js
|
78
|
+
|
79
|
+
├── config
|
80
|
+
|
81
|
+
│ ├── dev.env.js
|
82
|
+
|
83
|
+
│ ├── index.js
|
84
|
+
|
85
|
+
│ ├── prod.env.js
|
86
|
+
|
87
|
+
│ └── test.env.js
|
88
|
+
|
89
|
+
├── config.rb
|
90
|
+
|
91
|
+
├── index.html
|
92
|
+
|
93
|
+
├── node_modules
|
94
|
+
|
95
|
+
│ └── [略]
|
96
|
+
|
97
|
+
├── package-lock.json
|
98
|
+
|
99
|
+
├── package.json
|
100
|
+
|
101
|
+
├── src
|
102
|
+
|
103
|
+
│ ├── App.vue
|
104
|
+
|
105
|
+
│ ├── assets
|
106
|
+
|
107
|
+
│ │ └── [略]
|
108
|
+
|
109
|
+
│ ├── components
|
110
|
+
|
111
|
+
│ │ └── [略]
|
112
|
+
|
113
|
+
│ ├── main.js
|
114
|
+
|
115
|
+
│ └── router
|
116
|
+
|
117
|
+
│ └── index.js
|
118
|
+
|
119
|
+
├── static
|
120
|
+
|
121
|
+
└── test
|
122
|
+
|
123
|
+
└── [略]
|
124
|
+
|
125
|
+
```
|
126
|
+
|
127
|
+
|
128
|
+
|
129
|
+
|
130
|
+
|
131
|
+
[設定系ファイル]
|
132
|
+
|
133
|
+
|
134
|
+
|
135
|
+
```
|
136
|
+
|
137
|
+
[build/config/index.js]
|
138
|
+
|
139
|
+
|
140
|
+
|
141
|
+
'use strict'
|
142
|
+
|
143
|
+
// Template version: 1.2.5
|
144
|
+
|
145
|
+
// see http://vuejs-templates.github.io/webpack for documentation.
|
146
|
+
|
147
|
+
|
148
|
+
|
149
|
+
const path = require('path')
|
150
|
+
|
151
|
+
|
152
|
+
|
153
|
+
module.exports = {
|
154
|
+
|
155
|
+
dev: {
|
156
|
+
|
157
|
+
|
158
|
+
|
159
|
+
// Paths
|
160
|
+
|
161
|
+
assetsSubDirectory: 'static',
|
162
|
+
|
163
|
+
assetsPublicPath: '/',
|
164
|
+
|
165
|
+
proxyTable: {},
|
166
|
+
|
167
|
+
|
168
|
+
|
169
|
+
// Various Dev Server settings
|
170
|
+
|
171
|
+
host: 'localhost', // can be overwritten by process.env.HOST
|
172
|
+
|
173
|
+
port: 8080, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined
|
174
|
+
|
175
|
+
autoOpenBrowser: false,
|
176
|
+
|
177
|
+
errorOverlay: true,
|
178
|
+
|
179
|
+
notifyOnErrors: true,
|
180
|
+
|
181
|
+
poll: false, // https://webpack.js.org/configuration/dev-server/#devserver-watchoptions-
|
182
|
+
|
183
|
+
|
184
|
+
|
185
|
+
// Use Eslint Loader?
|
186
|
+
|
187
|
+
// If true, your code will be linted during bundling and
|
188
|
+
|
189
|
+
// linting errors and warnings will be shown in the console.
|
190
|
+
|
191
|
+
useEslint: true,
|
192
|
+
|
193
|
+
// If true, eslint errors and warnings will also be shown in the error overlay
|
194
|
+
|
195
|
+
// in the browser.
|
196
|
+
|
197
|
+
showEslintErrorsInOverlay: false,
|
198
|
+
|
199
|
+
|
200
|
+
|
201
|
+
/**
|
202
|
+
|
203
|
+
* Source Maps
|
204
|
+
|
205
|
+
*/
|
206
|
+
|
207
|
+
|
208
|
+
|
209
|
+
// https://webpack.js.org/configuration/devtool/#development
|
210
|
+
|
211
|
+
devtool: 'eval-source-map',
|
212
|
+
|
213
|
+
|
214
|
+
|
215
|
+
// If you have problems debugging vue-files in devtools,
|
216
|
+
|
217
|
+
// set this to false - it *may* help
|
218
|
+
|
219
|
+
// https://vue-loader.vuejs.org/en/options.html#cachebusting
|
220
|
+
|
221
|
+
cacheBusting: true,
|
222
|
+
|
223
|
+
|
224
|
+
|
225
|
+
// CSS Sourcemaps off by default because relative paths are "buggy"
|
226
|
+
|
227
|
+
// with this option, according to the CSS-Loader README
|
228
|
+
|
229
|
+
// (https://github.com/webpack/css-loader#sourcemaps)
|
230
|
+
|
231
|
+
// In our experience, they generally work as expected,
|
232
|
+
|
233
|
+
// just be aware of this issue when enabling this option.
|
234
|
+
|
235
|
+
cssSourceMap: false,
|
236
|
+
|
237
|
+
},
|
238
|
+
|
239
|
+
|
240
|
+
|
241
|
+
build: {
|
242
|
+
|
243
|
+
// Template for index.html
|
244
|
+
|
245
|
+
index: path.resolve(__dirname, '../dist/index.html'),
|
246
|
+
|
247
|
+
|
248
|
+
|
249
|
+
// Paths
|
250
|
+
|
251
|
+
assetsRoot: path.resolve(__dirname, '../dist'),
|
252
|
+
|
253
|
+
assetsSubDirectory: 'static',
|
254
|
+
|
255
|
+
assetsPublicPath: '/',
|
256
|
+
|
257
|
+
|
258
|
+
|
259
|
+
/**
|
260
|
+
|
261
|
+
* Source Maps
|
262
|
+
|
263
|
+
*/
|
264
|
+
|
265
|
+
|
266
|
+
|
267
|
+
productionSourceMap: true,
|
268
|
+
|
269
|
+
// https://webpack.js.org/configuration/devtool/#production
|
270
|
+
|
271
|
+
devtool: '#source-map',
|
272
|
+
|
273
|
+
|
274
|
+
|
275
|
+
// Gzip off by default as many popular static hosts such as
|
276
|
+
|
277
|
+
// Surge or Netlify already gzip all static assets for you.
|
278
|
+
|
279
|
+
// Before setting to `true`, make sure to:
|
280
|
+
|
281
|
+
// npm install --save-dev compression-webpack-plugin
|
282
|
+
|
283
|
+
productionGzip: false,
|
284
|
+
|
285
|
+
productionGzipExtensions: ['js', 'css'],
|
286
|
+
|
287
|
+
|
288
|
+
|
289
|
+
// Run the build command with an extra argument to
|
290
|
+
|
291
|
+
// View the bundle analyzer report after build finishes:
|
292
|
+
|
293
|
+
// `npm run build --report`
|
294
|
+
|
295
|
+
// Set to `true` or `false` to always turn it on or off
|
296
|
+
|
297
|
+
bundleAnalyzerReport: process.env.npm_config_report
|
298
|
+
|
299
|
+
}
|
300
|
+
|
301
|
+
}
|
302
|
+
|
303
|
+
|
304
|
+
|
305
|
+
```
|
306
|
+
|
307
|
+
|
308
|
+
|
309
|
+
```
|
310
|
+
|
311
|
+
[router/index.js]
|
312
|
+
|
313
|
+
|
314
|
+
|
315
|
+
import Vue from 'vue'
|
316
|
+
|
317
|
+
import Router from 'vue-router'
|
318
|
+
|
319
|
+
|
320
|
+
|
321
|
+
import pageTop from '@/components/page-top'
|
322
|
+
|
323
|
+
~[略]import その他もろもろコンポーネント~
|
324
|
+
|
325
|
+
|
326
|
+
|
327
|
+
Vue.use(Router)
|
328
|
+
|
329
|
+
|
330
|
+
|
331
|
+
export default new Router({
|
332
|
+
|
333
|
+
mode: 'history',
|
334
|
+
|
335
|
+
routes: [
|
336
|
+
|
337
|
+
{
|
338
|
+
|
339
|
+
path: '/',
|
340
|
+
|
341
|
+
name: 'top',
|
342
|
+
|
343
|
+
component: pageTop
|
344
|
+
|
345
|
+
},
|
346
|
+
|
347
|
+
~[略]その他もろもろパスとコンポーネント指定~
|
348
|
+
|
349
|
+
]
|
350
|
+
|
351
|
+
})
|
352
|
+
|
353
|
+
|
354
|
+
|
355
|
+
```
|
356
|
+
|
357
|
+
|
358
|
+
|
359
|
+
```javascript
|
360
|
+
|
361
|
+
[main.js]
|
362
|
+
|
363
|
+
|
364
|
+
|
365
|
+
import Vue from 'vue'
|
366
|
+
|
367
|
+
import App from './App'
|
368
|
+
|
369
|
+
import router from './router'
|
370
|
+
|
371
|
+
|
372
|
+
|
373
|
+
Vue.config.productionTip = false
|
374
|
+
|
375
|
+
|
376
|
+
|
377
|
+
new Vue({
|
378
|
+
|
379
|
+
el: '#app',
|
380
|
+
|
381
|
+
router,
|
382
|
+
|
383
|
+
template: '<App/>',
|
384
|
+
|
385
|
+
components: { App },
|
386
|
+
|
387
|
+
})
|
388
|
+
|
389
|
+
|
390
|
+
|
391
|
+
```
|