-
-
Save Stayl045/b9efe239d57a593f73a33cced8ab88e2 to your computer and use it in GitHub Desktop.
Revisions
-
ashx3s revised this gist
Mar 17, 2022 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -35,6 +35,7 @@ module.exports = { - This is the newer syntax and is focused on modules - If you are in a node project, `"type: "module"` should be in your package.json - Otherwise you can use this syntax by giving files the `.mjs` file extension - Vue and Nuxt use this style of imports ### Example (Using .mjs files) -
ashx3s revised this gist
Mar 17, 2022 . 1 changed file with 2 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -51,3 +51,5 @@ export const tasks = [ // array here ] ``` - **note that an array is not necessary, it is just the content type used in these examples** -
ashx3s revised this gist
Mar 17, 2022 . 1 changed file with 6 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -45,3 +45,9 @@ import { tasks } from './taskList.mjs' ``` - export file (tasList.mjs) ``` export const tasks = [ // array here ] ``` -
ashx3s revised this gist
Mar 17, 2022 . 1 changed file with 2 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -43,3 +43,5 @@ module.exports = { ``` import { tasks } from './taskList.mjs' ``` - export file (tasList.mjs) -
ashx3s revised this gist
Mar 17, 2022 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -10,7 +10,7 @@ ### Example: - In your import file (script.js) ``` const tasks = require('./taskList.js) @@ -38,7 +38,7 @@ module.exports = { ### Example (Using .mjs files) - import file (script.mjs) ``` import { tasks } from './taskList.mjs' -
ashx3s revised this gist
Mar 17, 2022 . 1 changed file with 6 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -37,3 +37,9 @@ module.exports = { - Otherwise you can use this syntax by giving files the `.mjs` file extension ### Example (Using .mjs files) - import file ``` import { tasks } from './taskList.mjs' ``` -
ashx3s revised this gist
Mar 17, 2022 . 1 changed file with 2 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -35,3 +35,5 @@ module.exports = { - This is the newer syntax and is focused on modules - If you are in a node project, `"type: "module"` should be in your package.json - Otherwise you can use this syntax by giving files the `.mjs` file extension ### Example (Using .mjs files) -
ashx3s revised this gist
Mar 17, 2022 . No changes.There are no files selected for viewing
-
ashx3s revised this gist
Mar 17, 2022 . 1 changed file with 6 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -29,3 +29,9 @@ module.exports = { --- ## ES6 Syntax **import/export** - This is the newer syntax and is focused on modules - If you are in a node project, `"type: "module"` should be in your package.json - Otherwise you can use this syntax by giving files the `.mjs` file extension -
ashx3s revised this gist
Mar 17, 2022 . 1 changed file with 5 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -6,6 +6,7 @@ - This is the older way that node would import files into one another. - Use it with normal javascript files. This works whether you have a package.json or not - Some node packages may not be compatible with this syntax. But it is still in use ### Example: @@ -24,3 +25,7 @@ module.exports = { ] } ``` --- ## ES6 Syntax -
ashx3s revised this gist
Mar 17, 2022 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -20,7 +20,7 @@ const tasks = require('./taskList.js) ``` module.exports = { tasks: [ // output content here ] } ``` -
ashx3s revised this gist
Mar 17, 2022 . 1 changed file with 3 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -19,6 +19,8 @@ const tasks = require('./taskList.js) ``` module.exports = { tasks: [ // array here ] } ``` -
ashx3s revised this gist
Mar 17, 2022 . 1 changed file with 3 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -18,5 +18,7 @@ const tasks = require('./taskList.js) - Your export file would look something like this ``` module.exports = { } ``` -
ashx3s revised this gist
Mar 17, 2022 . 1 changed file with 6 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -14,3 +14,9 @@ ``` const tasks = require('./taskList.js) ``` - Your export file would look something like this ``` cons ``` -
ashx3s revised this gist
Mar 17, 2022 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -9,7 +9,7 @@ ### Example: - In your import file, the syntax would look like this ``` const tasks = require('./taskList.js) -
ashx3s revised this gist
Mar 17, 2022 . 1 changed file with 8 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -6,3 +6,11 @@ - This is the older way that node would import files into one another. - Use it with normal javascript files. This works whether you have a package.json or not ### Example: - import file ``` const tasks = require('./taskList.js) ``` -
ashx3s revised this gist
Mar 17, 2022 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -5,3 +5,4 @@ **module.exports/require** - This is the older way that node would import files into one another. - Use it with normal javascript files. This works whether you have a package.json or not -
ashx3s revised this gist
Mar 17, 2022 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -2,6 +2,6 @@ ## Common JS Module System **module.exports/require** - This is the older way that node would import files into one another. -
ashx3s revised this gist
Mar 17, 2022 . 1 changed file with 3 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,5 +1,7 @@ # How to import javascript files into one another ## Common JS Module System ** module.exports/require** - This is the older way that node would import files into one another. -
ashx3s revised this gist
Mar 17, 2022 . 1 changed file with 5 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1 +1,5 @@ # How to import javascript files into one another ## Common JS System - This is the older way that node would import files into one another. -
ashx3s created this gist
Mar 17, 2022 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1 @@