Customize boilerplate for project
Add a free license, write readme, change app and project name, update info in package.json.
This commit is contained in:
parent
367ec26e79
commit
49d649a3b3
21
LICENSE
Normal file
21
LICENSE
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
The MIT License (MIT)
|
||||||
|
|
||||||
|
Copyright (c) 2017 Tanner Collin
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
in the Software without restriction, including without limitation the rights
|
||||||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all
|
||||||
|
copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
|
SOFTWARE.
|
41
README.md
41
README.md
|
@ -1,14 +1,37 @@
|
||||||
## Counter Example
|
# Exact Resistor Calculator
|
||||||
|
Recommends resistors to combine in parallel to meet an exact target.
|
||||||
|
|
||||||
#### React-Native 0.32.0 & Redux 3.5.2 & React-Redux 4.4.5
|
## Usage
|
||||||
|
|
||||||
This repo demonstrates the usage of latest React-Native with Redux.
|
Enter the target resistance you wish to make in the first field.
|
||||||
|
The app will then recommend a value for a resistor to start with.
|
||||||
|
It will be the same value as you entered because that will obviously get you to your target.
|
||||||
|
|
||||||
### Usage
|
Next go find a resistor as close to the recommended value and then measure it.
|
||||||
|
Enter the reading into the list of resistors that you have.
|
||||||
|
Then keep doing this for all the resistor values that the app recommends.
|
||||||
|
|
||||||
- you have to use `npm@3.x`, if you are using `npm@2.x` you might get into some weird scenarios. Please open an issue if you can't get it run on `npm@2.x`. also you can follow this [issue](https://github.com/rackt/react-redux/issues/236) for more info.
|
Within 2-3 resistors, you'll notice the percent error from your target will drop well into a suitable range.
|
||||||
- clone the project
|
|
||||||
- go to `Counter` folder
|
|
||||||
- run `npm install`
|
|
||||||
|
|
||||||
Cheers,
|
## Setup
|
||||||
|
|
||||||
|
Please install Exact Resistor Calculator from the Google Play Store on your Android phone for free.
|
||||||
|
|
||||||
|
## Source Code
|
||||||
|
|
||||||
|
### License
|
||||||
|
|
||||||
|
Exact Resistor Calculator is free and open-source software released under the MIT License.
|
||||||
|
|
||||||
|
### Building
|
||||||
|
|
||||||
|
Building Exact Resistor Calculator from source is very easy.
|
||||||
|
Clone this repository, set up react-native, and then run these commands:
|
||||||
|
|
||||||
|
```
|
||||||
|
$ npm install
|
||||||
|
$ react-native run-android
|
||||||
|
$ react-native start
|
||||||
|
```
|
||||||
|
|
||||||
|
If you want to debug on your physical phone, be sure to run ```adb reverse tcp:8081 tcp:8081``` first.
|
||||||
|
|
|
@ -46,13 +46,13 @@ android_library(
|
||||||
|
|
||||||
android_build_config(
|
android_build_config(
|
||||||
name = 'build_config',
|
name = 'build_config',
|
||||||
package = 'com.counter',
|
package = 'com.exactresistorcalculator',
|
||||||
)
|
)
|
||||||
|
|
||||||
android_resource(
|
android_resource(
|
||||||
name = 'res',
|
name = 'res',
|
||||||
res = 'src/main/res',
|
res = 'src/main/res',
|
||||||
package = 'com.counter',
|
package = 'com.exactresistorcalculator',
|
||||||
)
|
)
|
||||||
|
|
||||||
android_binary(
|
android_binary(
|
||||||
|
|
|
@ -88,7 +88,7 @@ android {
|
||||||
buildToolsVersion "23.0.1"
|
buildToolsVersion "23.0.1"
|
||||||
|
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
applicationId "com.counter"
|
applicationId "com.exactresistorcalculator"
|
||||||
minSdkVersion 16
|
minSdkVersion 16
|
||||||
targetSdkVersion 22
|
targetSdkVersion 22
|
||||||
versionCode 1
|
versionCode 1
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
package="com.counter">
|
package="com.exactresistorcalculator">
|
||||||
|
|
||||||
<uses-permission android:name="android.permission.INTERNET" />
|
<uses-permission android:name="android.permission.INTERNET" />
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package com.counter;
|
package com.exactresistorcalculator;
|
||||||
|
|
||||||
import com.facebook.react.ReactActivity;
|
import com.facebook.react.ReactActivity;
|
||||||
|
|
||||||
|
@ -10,6 +10,6 @@ public class MainActivity extends ReactActivity {
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
protected String getMainComponentName() {
|
protected String getMainComponentName() {
|
||||||
return "Counter";
|
return "exactresistorcalculator";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package com.counter;
|
package com.exactresistorcalculator;
|
||||||
|
|
||||||
import android.app.Application;
|
import android.app.Application;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
<resources>
|
<resources>
|
||||||
<string name="app_name">Counter</string>
|
<string name="app_name">Exact Resistor Calculator</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
rootProject.name = 'Counter'
|
rootProject.name = 'exactresistorcalculator'
|
||||||
|
|
||||||
include ':app'
|
include ':app'
|
||||||
|
|
||||||
|
|
|
@ -3,4 +3,4 @@
|
||||||
import React, { AppRegistry } from 'react-native';
|
import React, { AppRegistry } from 'react-native';
|
||||||
import App from './src/containers/app';
|
import App from './src/containers/app';
|
||||||
|
|
||||||
AppRegistry.registerComponent('Counter', () => App);
|
AppRegistry.registerComponent('exactresistorcalculator', () => App);
|
||||||
|
|
|
@ -3,4 +3,4 @@
|
||||||
import React, { AppRegistry } from 'react-native';
|
import React, { AppRegistry } from 'react-native';
|
||||||
import App from './src/containers/app';
|
import App from './src/containers/app';
|
||||||
|
|
||||||
AppRegistry.registerComponent('Counter', () => App);
|
AppRegistry.registerComponent('exactresistorcalculator', () => App);
|
||||||
|
|
19
package.json
19
package.json
|
@ -1,13 +1,16 @@
|
||||||
{
|
{
|
||||||
"name": "Counter",
|
"name": "exact-resistor-calculator",
|
||||||
"version": "0.0.1",
|
"version": "1.0.0",
|
||||||
"private": true,
|
"description": "Recommends resistors to combine in parallel to meet an exact target.",
|
||||||
"scripts": {
|
"repository": {
|
||||||
"start": "react-native start",
|
"type": "git",
|
||||||
"setup_project": "npm run step1; npm run step2",
|
"url": "https://github.com/tannercollin/exact-resistor-calculator"
|
||||||
"step1": "rm -rf node_modules/react-native/node_modules/react; rm -rf node_modules/react-native/node_modules/fbjs; rm -rf node_modules/react/node_modules/fbjs",
|
|
||||||
"step2": "cd node_modules; find . -name .babelrc | grep -v packager | xargs rm"
|
|
||||||
},
|
},
|
||||||
|
"scripts": {
|
||||||
|
"start": "react-native start"
|
||||||
|
},
|
||||||
|
"author": "Tanner Collin (http://github.com/tannercollin)",
|
||||||
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"react": "15.3.2",
|
"react": "15.3.2",
|
||||||
"react-native": "0.34.0",
|
"react-native": "0.34.0",
|
||||||
|
|
Loading…
Reference in New Issue
Block a user