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:
Tanner Collin 2017-02-03 00:26:46 -07:00
parent 367ec26e79
commit 49d649a3b3
12 changed files with 75 additions and 28 deletions

21
LICENSE Normal file
View 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.

View File

@ -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.
- clone the project
- go to `Counter` folder
- run `npm install`
Within 2-3 resistors, you'll notice the percent error from your target will drop well into a suitable range.
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.

View File

@ -46,13 +46,13 @@ android_library(
android_build_config(
name = 'build_config',
package = 'com.counter',
package = 'com.exactresistorcalculator',
)
android_resource(
name = 'res',
res = 'src/main/res',
package = 'com.counter',
package = 'com.exactresistorcalculator',
)
android_binary(

View File

@ -88,7 +88,7 @@ android {
buildToolsVersion "23.0.1"
defaultConfig {
applicationId "com.counter"
applicationId "com.exactresistorcalculator"
minSdkVersion 16
targetSdkVersion 22
versionCode 1

View File

@ -1,5 +1,5 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.counter">
package="com.exactresistorcalculator">
<uses-permission android:name="android.permission.INTERNET" />

View File

@ -1,4 +1,4 @@
package com.counter;
package com.exactresistorcalculator;
import com.facebook.react.ReactActivity;
@ -10,6 +10,6 @@ public class MainActivity extends ReactActivity {
*/
@Override
protected String getMainComponentName() {
return "Counter";
return "exactresistorcalculator";
}
}

View File

@ -1,4 +1,4 @@
package com.counter;
package com.exactresistorcalculator;
import android.app.Application;
import android.util.Log;

View File

@ -1,3 +1,3 @@
<resources>
<string name="app_name">Counter</string>
<string name="app_name">Exact Resistor Calculator</string>
</resources>

View File

@ -1,4 +1,4 @@
rootProject.name = 'Counter'
rootProject.name = 'exactresistorcalculator'
include ':app'

View File

@ -3,4 +3,4 @@
import React, { AppRegistry } from 'react-native';
import App from './src/containers/app';
AppRegistry.registerComponent('Counter', () => App);
AppRegistry.registerComponent('exactresistorcalculator', () => App);

View File

@ -3,4 +3,4 @@
import React, { AppRegistry } from 'react-native';
import App from './src/containers/app';
AppRegistry.registerComponent('Counter', () => App);
AppRegistry.registerComponent('exactresistorcalculator', () => App);

View File

@ -1,13 +1,16 @@
{
"name": "Counter",
"version": "0.0.1",
"private": true,
"scripts": {
"start": "react-native start",
"setup_project": "npm run step1; npm run step2",
"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"
"name": "exact-resistor-calculator",
"version": "1.0.0",
"description": "Recommends resistors to combine in parallel to meet an exact target.",
"repository": {
"type": "git",
"url": "https://github.com/tannercollin/exact-resistor-calculator"
},
"scripts": {
"start": "react-native start"
},
"author": "Tanner Collin (http://github.com/tannercollin)",
"license": "MIT",
"dependencies": {
"react": "15.3.2",
"react-native": "0.34.0",