├── storage
└── .gitkeep
├── .gitignore
├── src
├── mycss2.css
├── app-core
│ └── lib.ts
├── mycss.css
├── app.ts
└── index.d.ts
├── neutralinojs.log
├── neutralino.png
├── app
├── settings-browser.json
├── settings-cloud.json
├── settings.json
├── assets
│ ├── app.js
│ ├── app.css
│ └── neutralino.js
└── index.html
├── tsconfig.json
├── package.json
├── README.md
├── .github
└── FUNDING.yml
├── webpack.config.js
└── LICENSE
/storage/.gitkeep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | node_modules
2 | .log
--------------------------------------------------------------------------------
/src/mycss2.css:
--------------------------------------------------------------------------------
1 | body {
2 | background-color: black;
3 | }
--------------------------------------------------------------------------------
/neutralinojs.log:
--------------------------------------------------------------------------------
1 | ERROR [src/Socket.cpp:Bind] Socket::bind error: Address already in use
2 |
--------------------------------------------------------------------------------
/neutralino.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/neutralinojs/neutralinojs-typescript/HEAD/neutralino.png
--------------------------------------------------------------------------------
/app/settings-browser.json:
--------------------------------------------------------------------------------
1 | {
2 | "appname" : "myapp",
3 | "appport" : "8080",
4 | "mode" : "browser"
5 | }
6 |
--------------------------------------------------------------------------------
/app/settings-cloud.json:
--------------------------------------------------------------------------------
1 | {
2 | "appname" : "myapp",
3 | "appport" : "8080",
4 | "mode" : "cloud",
5 | "cloud" : {
6 | "blacklist" : ["os.runCommand"]
7 | }
8 | }
9 |
--------------------------------------------------------------------------------
/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "outDir": "./dist/",
4 | "noImplicitAny": true,
5 | "module": "es6",
6 | "target": "es5",
7 | "allowJs": false
8 | }
9 | }
--------------------------------------------------------------------------------
/src/app-core/lib.ts:
--------------------------------------------------------------------------------
1 | export class AppLib {
2 | public showSettings(): void {
3 | Neutralino.settings.getSettings((data) => {
4 | alert(JSON.stringify(data));
5 | }, () => {
6 |
7 | });
8 | }
9 | }
--------------------------------------------------------------------------------
/app/settings.json:
--------------------------------------------------------------------------------
1 | {
2 | "appname" : "myapp",
3 | "appport" : "5006",
4 | "mode" : "window",
5 | "iconfile" : "neutralino.png",
6 | "window" : {
7 | "width" : "1000",
8 | "height" : "700",
9 | "fullscreen" : false
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "neutralinojs-typescript",
3 | "version": "1.0.0",
4 | "description": "",
5 | "main": "index.js",
6 | "scripts": {
7 | "build": "webpack -p --config webpack.config.js",
8 | "test": "echo \"Error: no test specified\" && exit 1"
9 | },
10 | "author": "",
11 | "license": "ISC",
12 | "devDependencies": {
13 | "css-loader": "^3.6.0",
14 | "extract-text-webpack-plugin": "^3.0.2",
15 | "mini-css-extract-plugin": "^0.9.0",
16 | "ts-loader": "^6.2.2",
17 | "typescript": "^3.9.7",
18 | "webpack": "^4.44.1",
19 | "webpack-cli": "^3.3.12"
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | ## Notice 🔔
2 |
3 | Please use https://github.com/neutralinojs/neutralinojs-minimal instead of this template, if you are trying Neutralinojs v2.
4 |
5 | # neutralinojs-typescript
6 |
7 | Typescript starter project for Neutralinojs
8 |
9 | ## Get started
10 |
11 | Install [neu-cli](https://neutralino.js.org/docs/#/tools/cli)
12 |
13 | ```bash
14 | $ npm i -g @neutralinojs/neu
15 | ```
16 |
17 | Create Neutralino app with Typescript template
18 |
19 | ```bash
20 | $ neu create myapp --template ts
21 | $ cd myapp
22 | ```
23 |
24 | Bundle source files
25 |
26 | ```bash
27 | $ neu build
28 | ```
29 |
30 | Learn more about neu-cli from [docs](https://neutralino.js.org/docs/#/tools/cli)
31 |
--------------------------------------------------------------------------------
/.github/FUNDING.yml:
--------------------------------------------------------------------------------
1 | # These are supported funding model platforms
2 |
3 | github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
4 | patreon: shalithasuranga
5 | open_collective: # Replace with a single Open Collective username
6 | ko_fi: # Replace with a single Ko-fi username
7 | tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
8 | community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
9 | liberapay: # Replace with a single Liberapay username
10 | issuehunt: # Replace with a single IssueHunt username
11 | otechie: # Replace with a single Otechie username
12 | custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
13 |
--------------------------------------------------------------------------------
/webpack.config.js:
--------------------------------------------------------------------------------
1 | const path = require('path');
2 | const MiniCssExtractPlugin = require('mini-css-extract-plugin');
3 |
4 | module.exports = {
5 | entry: path.resolve(__dirname, './src/app.ts'),
6 | module: {
7 | rules: [
8 | {
9 | test: /\.ts?$/,
10 | use: 'ts-loader',
11 | exclude: /node_modules/,
12 | },
13 | {
14 | test: /\.css$/i,
15 | use: [
16 | {
17 | loader: MiniCssExtractPlugin.loader,
18 | },
19 | 'css-loader',
20 | ],
21 | },
22 |
23 | ],
24 | },
25 | resolve: {
26 | extensions: ['.ts'],
27 | },
28 | output: {
29 | filename: 'app.js',
30 | path: path.resolve(__dirname, './app/assets'),
31 | },
32 | plugins: [
33 | new MiniCssExtractPlugin({
34 | filename: 'app.css'
35 | }),
36 | ],
37 | };
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2019 Neutralinojs
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/app/assets/app.js:
--------------------------------------------------------------------------------
1 | !function(n){var t={};function e(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return n[r].call(o.exports,o,o.exports,e),o.l=!0,o.exports}e.m=n,e.c=t,e.d=function(n,t,r){e.o(n,t)||Object.defineProperty(n,t,{enumerable:!0,get:r})},e.r=function(n){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(n,"__esModule",{value:!0})},e.t=function(n,t){if(1&t&&(n=e(n)),8&t)return n;if(4&t&&"object"==typeof n&&n&&n.__esModule)return n;var r=Object.create(null);if(e.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:n}),2&t&&"string"!=typeof n)for(var o in n)e.d(r,o,function(t){return n[t]}.bind(null,o));return r},e.n=function(n){var t=n&&n.__esModule?function(){return n.default}:function(){return n};return e.d(t,"a",t),t},e.o=function(n,t){return Object.prototype.hasOwnProperty.call(n,t)},e.p="",e(e.s=2)}([function(n,t,e){},function(n,t,e){},function(n,t,e){"use strict";e.r(t);var r=function(){function n(){}return n.prototype.showSettings=function(){Neutralino.settings.getSettings((function(n){alert(JSON.stringify(n))}),(function(){}))},n}(),o=(e(0),e(1),new r),i=function(){document.getElementById("info").innerHTML=NL_NAME+" is running on port "+NL_PORT+" inside "+NL_OS+"
v"+NL_VERSION+""};Neutralino.init({load:function(){i(),o.showSettings()},pingSuccessCallback:function(){},pingFailCallback:function(){}})}]);
--------------------------------------------------------------------------------
/src/mycss.css:
--------------------------------------------------------------------------------
1 | /*
2 | MIT License
3 |
4 | Copyright (c) 2018 Neutralinojs
5 |
6 | Permission is hereby granted, free of charge, to any person obtaining a copy
7 | of this software and associated documentation files (the "Software"), to deal
8 | in the Software without restriction, including without limitation the rights
9 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | copies of the Software, and to permit persons to whom the Software is
11 | furnished to do so, subject to the following conditions:
12 |
13 | The above copyright notice and this permission notice shall be included in all
14 | copies or substantial portions of the Software.
15 |
16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | SOFTWARE. */
23 |
24 | #neutralinoapp {
25 | text-align: center;
26 | color: white;
27 | }
28 | #neutralinoapp h1{
29 | font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
30 | font-size: 20px;
31 | color: #000000;
32 | }
33 | #neutralinoapp a {
34 | margin-left: 12px;
35 | }
36 | #neutralinoapp span {
37 | font-size: 12px;
38 | font-weight: normal;
39 | }
--------------------------------------------------------------------------------
/app/index.html:
--------------------------------------------------------------------------------
1 |
2 |
24 |
25 |
26 |
27 |