@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.
@@ -1 +1 @@
1
- 0.0.81
1
+ 0.0.83
@@ -20,7 +20,7 @@ const PUBLIC = path.join(ROOT, 'public')
20
20
  app.use(express.static(PUBLIC))
21
21
 
22
22
  // Routes
23
- app.get('/', (req, res) => { res.json({ data: true }) })
23
+ app.get('/some-route', (req, res) => { res.json({ data: true }) })
24
24
 
25
25
  // Start server
26
26
  serve(app)
@@ -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
- <h1>LM-Publisher</h1>
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
- <h1>LM-Publisher</h1>
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,6 +1,6 @@
1
1
  {
2
2
  "name": "@design-edito/cli",
3
- "version": "0.0.81",
3
+ "version": "0.0.83",
4
4
  "description": "",
5
5
  "author": "Maxime Fabas",
6
6
  "license": "ISC",
@@ -1,7 +0,0 @@
1
- html {
2
- font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
3
- }
4
-
5
- button {
6
- cursor: pointer;
7
- }
@@ -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,7 +0,0 @@
1
- html {
2
- font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
3
- }
4
-
5
- button {
6
- cursor: pointer;
7
- }
@@ -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
- })