@design-edito/cli 0.0.81 → 0.0.83
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cli/assets/version.txt +1 -1
- package/make-template/assets/express/src/index.ts +1 -1
- package/make-template/assets/express/src/public/index.html +1 -6
- package/make-template/assets/express-api/src/public/index.html +1 -6
- package/package.json +1 -1
- package/make-template/assets/express/src/public/index.css +0 -7
- package/make-template/assets/express/src/public/index.js +0 -31
- package/make-template/assets/express-api/src/public/index.css +0 -7
- package/make-template/assets/express-api/src/public/index.js +0 -31
package/cli/assets/version.txt
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
0.0.
|
|
1
|
+
0.0.83
|
|
@@ -3,13 +3,8 @@
|
|
|
3
3
|
<head>
|
|
4
4
|
<meta charset="utf-8">
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
6
|
-
<script type="module" src="./index.js"></script>
|
|
7
|
-
<link rel="stylesheet" href="./index.css">
|
|
8
6
|
</head>
|
|
9
7
|
<body>
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
<button class="create-random-project">Create random project</button>
|
|
13
|
-
|
|
8
|
+
A static HTML page.
|
|
14
9
|
</body>
|
|
15
10
|
</html>
|
|
@@ -3,13 +3,8 @@
|
|
|
3
3
|
<head>
|
|
4
4
|
<meta charset="utf-8">
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
6
|
-
<script type="module" src="./index.js"></script>
|
|
7
|
-
<link rel="stylesheet" href="./index.css">
|
|
8
6
|
</head>
|
|
9
7
|
<body>
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
<button class="create-random-project">Create random project</button>
|
|
13
|
-
|
|
8
|
+
A static HTML page.
|
|
14
9
|
</body>
|
|
15
10
|
</html>
|
package/package.json
CHANGED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
const $responses = document.querySelector('.requests')
|
|
2
|
-
const $createRandomProject = document.querySelector('.create-random-project')
|
|
3
|
-
|
|
4
|
-
async function fetchAndLog (url, method, body) {
|
|
5
|
-
const id = Math.random().toString(36).slice(2)
|
|
6
|
-
console.log('%cSending request...', 'font-weight: 600')
|
|
7
|
-
console.log('id:', id)
|
|
8
|
-
console.log(`${method}:`, url)
|
|
9
|
-
const response = await window.fetch(url, {
|
|
10
|
-
method,
|
|
11
|
-
body: JSON.stringify(body),
|
|
12
|
-
headers: { 'Content-Type': 'application/json' }
|
|
13
|
-
})
|
|
14
|
-
const json = await response.json()
|
|
15
|
-
console.log('%cReceived response', 'font-weight: 600')
|
|
16
|
-
console.log('id:', id)
|
|
17
|
-
console.log(`${method}:`, url)
|
|
18
|
-
console.log('body:', body)
|
|
19
|
-
console.log('response:', response)
|
|
20
|
-
console.log('json:', json)
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
$createRandomProject.addEventListener('click', () => {
|
|
24
|
-
fetchAndLog('http://localhost:3000/projects/create', 'POST', {
|
|
25
|
-
name: 'Mon premier projet :\')',
|
|
26
|
-
publicationTargetDate: Date.now(),
|
|
27
|
-
sourcesIds: [],
|
|
28
|
-
articlesIds: [],
|
|
29
|
-
assetsIds: [],
|
|
30
|
-
})
|
|
31
|
-
})
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
const $responses = document.querySelector('.requests')
|
|
2
|
-
const $createRandomProject = document.querySelector('.create-random-project')
|
|
3
|
-
|
|
4
|
-
async function fetchAndLog (url, method, body) {
|
|
5
|
-
const id = Math.random().toString(36).slice(2)
|
|
6
|
-
console.log('%cSending request...', 'font-weight: 600')
|
|
7
|
-
console.log('id:', id)
|
|
8
|
-
console.log(`${method}:`, url)
|
|
9
|
-
const response = await window.fetch(url, {
|
|
10
|
-
method,
|
|
11
|
-
body: JSON.stringify(body),
|
|
12
|
-
headers: { 'Content-Type': 'application/json' }
|
|
13
|
-
})
|
|
14
|
-
const json = await response.json()
|
|
15
|
-
console.log('%cReceived response', 'font-weight: 600')
|
|
16
|
-
console.log('id:', id)
|
|
17
|
-
console.log(`${method}:`, url)
|
|
18
|
-
console.log('body:', body)
|
|
19
|
-
console.log('response:', response)
|
|
20
|
-
console.log('json:', json)
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
$createRandomProject.addEventListener('click', () => {
|
|
24
|
-
fetchAndLog('http://localhost:3000/projects/create', 'POST', {
|
|
25
|
-
name: 'Mon premier projet :\')',
|
|
26
|
-
publicationTargetDate: Date.now(),
|
|
27
|
-
sourcesIds: [],
|
|
28
|
-
articlesIds: [],
|
|
29
|
-
assetsIds: [],
|
|
30
|
-
})
|
|
31
|
-
})
|